/* ==========================================================================
   ABAJUR INTERATIVO — Modern Wood Design
   Grid item ao lado do card 04
   ========================================================================== */

/* Spacer invisível para posicionar abajur na 3ª coluna */
.grid-spacer {
  display: none;
}
@media (min-width: 960px) {
  .grid-spacer {
    display: block;
    min-height: 0;
  }
}

.lamp-card {
  position: relative;
  background: linear-gradient(160deg,rgba(255,255,255,0.04) 0%,rgba(255,255,255,0.015) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: 40px 32px 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
}

.lamp-card:hover {
  border-color: rgba(215,180,106,0.18);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.lamp-scene {
  position: relative;
  width: 220px;
  height: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* ===== GLOW PAREDE ===== */
.lamp-wall-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%,rgba(255,210,120,0) 0%,transparent 70%);
  pointer-events: none;
  transition: background 0.8s ease;
  z-index: 0;
}
.lamp-card.is-on .lamp-wall-glow {
  background: radial-gradient(ellipse at 50% 60%,rgba(255,210,120,0.08) 0%,rgba(255,190,80,0.03) 40%,transparent 70%);
}

/* ===== CORPO ===== */
.lamp-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

/* --- CÚPULA --- */
.lamp-shade {
  position: relative;
  width: 130px; height: 60px;
}

.lamp-shade-top {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 60px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg,#8B7355,#A08060,#9B7550,#A58B6B,#8B7355);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  z-index: 3;
}

.lamp-shade-fabric {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 52px;
  clip-path: polygon(15% 0%,85% 0%,100% 100%,0% 100%);
  background:
    repeating-linear-gradient(0deg,transparent,transparent 3px,rgba(255,255,255,0.03) 3px,rgba(255,255,255,0.03) 4px),
    repeating-linear-gradient(90deg,transparent,transparent 4px,rgba(255,255,255,0.02) 4px,rgba(255,255,255,0.02) 5px),
    linear-gradient(180deg,rgba(180,160,130,0.85) 0%,rgba(140,120,95,0.95) 100%);
  box-shadow: inset 0 -8px 16px rgba(0,0,0,0.15),0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.6s ease;
  z-index: 2;
}

.lamp-card.is-on .lamp-shade-fabric {
  background:
    repeating-linear-gradient(0deg,transparent,transparent 3px,rgba(255,255,255,0.04) 3px,rgba(255,255,255,0.04) 4px),
    repeating-linear-gradient(90deg,transparent,transparent 4px,rgba(255,255,255,0.03) 4px,rgba(255,255,255,0.03) 5px),
    linear-gradient(180deg,rgba(255,220,150,0.7) 0%,rgba(240,200,130,0.8) 50%,rgba(220,180,110,0.75) 100%);
  box-shadow: inset 0 -4px 12px rgba(255,200,100,0.2),0 0 30px rgba(255,200,100,0.15),0 0 60px rgba(255,180,80,0.08);
}

.lamp-shade-rim {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 134px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg,#6B5540,#7D6650,#6B5540);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 3;
}

.lamp-bulb {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 20px;
  border-radius: 50% 50% 40% 40%;
  background: rgba(80,70,55,0.4);
  transition: all 0.5s ease;
  z-index: 1;
}
.lamp-card.is-on .lamp-bulb {
  background: radial-gradient(ellipse at 50% 40%,rgba(255,245,200,1) 0%,rgba(255,220,140,0.9) 50%,rgba(255,190,90,0.6) 100%);
  box-shadow: 0 0 16px rgba(255,220,140,0.7),0 0 40px rgba(255,200,100,0.35),0 0 80px rgba(255,180,80,0.15);
}

.lamp-light-spill {
  position: absolute; bottom: -50px; left: 50%; transform: translateX(-50%);
  width: 160px; height: 50px;
  background: radial-gradient(ellipse at 50% 0%,rgba(255,210,120,0) 0%,transparent 70%);
  pointer-events: none;
  transition: all 0.8s ease;
}
.lamp-card.is-on .lamp-light-spill {
  background: radial-gradient(ellipse at 50% 0%,rgba(255,210,120,0.25) 0%,rgba(255,190,80,0.08) 50%,transparent 80%);
}

/* --- BRAÇO --- */
.lamp-arm { position: relative; width: 12px; height: 20px; display: flex; justify-content: center; }
.lamp-arm-curve {
  width: 10px; height: 100%;
  background: linear-gradient(90deg,#6B5540,#8B7355 40%,#7D6650 60%,#6B5540);
  border-radius: 3px;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}

/* --- HASTE --- */
.lamp-stem {
  width: 8px; height: 80px;
  background: linear-gradient(90deg,#5A4535 0%,#7D6650 30%,#8B7355 50%,#7D6650 70%,#5A4535 100%);
  border-radius: 4px;
  box-shadow: 1px 0 3px rgba(0,0,0,0.15),-1px 0 3px rgba(0,0,0,0.1);
  position: relative;
}
.lamp-stem::after {
  content: '';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 14px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg,#A08060,#D7B46A,#A08060);
  box-shadow: 0 0 6px rgba(215,180,106,0.2);
}

/* --- BASE --- */
.lamp-base { position: relative; display: flex; flex-direction: column; align-items: center; }
.lamp-base-plate {
  width: 90px; height: 16px; border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 30%,rgba(255,255,255,0.08) 0%,transparent 60%),
    linear-gradient(135deg,#4A3A2C 0%,#6B5540 25%,#7D6650 50%,#6B5540 75%,#4A3A2C 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35),inset 0 1px 2px rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.04);
}
.lamp-base-shadow {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 6px; border-radius: 50%;
  background: rgba(0,0,0,0.25); filter: blur(4px);
  transition: all 0.6s ease;
}
.lamp-card.is-on .lamp-base-shadow {
  width: 80px; background: rgba(0,0,0,0.15);
  box-shadow: 0 0 20px rgba(255,200,100,0.06);
}

/* ===== CORDINHA ===== */
.lamp-cord {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; z-index: 20;
  padding: 4px 8px;
  margin-top: -6px;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.lamp-cord-string {
  width: 1.5px; height: 55px;
  background: linear-gradient(180deg,rgba(215,180,106,0.5) 0%,rgba(215,180,106,0.7) 100%);
  border-radius: 1px;
}

.lamp-cord-pull {
  width: 14px; height: 14px; border-radius: 50%;
  background:
    radial-gradient(ellipse at 35% 35%,rgba(255,255,255,0.15) 0%,transparent 50%),
    linear-gradient(135deg,#A08060,#8B7355,#6B5540);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3),0 0 8px rgba(215,180,106,0.1);
  border: 1px solid rgba(215,180,106,0.2);
  transition: all 0.3s ease;
}
.lamp-cord:hover .lamp-cord-pull {
  background:
    radial-gradient(ellipse at 35% 35%,rgba(255,255,255,0.2) 0%,transparent 50%),
    linear-gradient(135deg,#B8935A,#A08060,#8B7355);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35),0 0 12px rgba(215,180,106,0.2);
  transform: scale(1.15);
}

@keyframes cordPull {
  0%   { transform: translateY(0); }
  25%  { transform: translateY(20px); }
  55%  { transform: translateY(-5px); }
  75%  { transform: translateY(3px); }
  100% { transform: translateY(0); }
}
.lamp-cord.pulling {
  animation: cordPull 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
  pointer-events: none;
}

/* ===== CONTROLES ===== */
.lamp-controls { margin-top: 20px; z-index: 10; }

.lamp-switch {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  cursor: pointer; transition: all 0.35s ease;
  color: inherit;
}
.lamp-switch:hover { background: rgba(255,255,255,0.06); border-color: rgba(215,180,106,0.2); }
.lamp-card.is-on .lamp-switch { background: rgba(215,180,106,0.08); border-color: rgba(215,180,106,0.3); }

.lamp-switch-icon {
  width: 20px; height: 20px;
  color: rgba(255,255,255,0.25); transition: all 0.4s ease;
  display: flex; align-items: center; justify-content: center;
}
.lamp-switch-icon svg { width: 100%; height: 100%; }
.lamp-card.is-on .lamp-switch-icon {
  color: rgba(215,180,106,0.95);
  filter: drop-shadow(0 0 6px rgba(215,180,106,0.4));
}

.lamp-switch-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 800; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.2); transition: all 0.4s ease;
}
.lamp-card.is-on .lamp-switch-label { color: rgba(215,180,106,0.9); }

/* ===== POEIRA ===== */
.lamp-dust {
  position: absolute; top: 60px; left: 20px; right: 20px; bottom: 40px;
  pointer-events: none; z-index: 3; overflow: hidden;
  opacity: 0; transition: opacity 1.2s ease;
}
.lamp-card.is-on .lamp-dust { opacity: 1; }

.dust-mote {
  position: absolute;
  width: var(--size,2px); height: var(--size,2px);
  border-radius: 50%;
  background: rgba(255,220,140,0.5);
  animation: dustDrift var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
}
@keyframes dustDrift {
  0%   { transform: translate(0,0) scale(1); opacity: 0; }
  10%  { opacity: 0.6; }
  50%  { transform: translate(var(--dx),var(--dy)) scale(0.7); opacity: 0.35; }
  90%  { opacity: 0.5; }
  100% { transform: translate(calc(var(--dx)*1.3),calc(var(--dy)*1.8)) scale(0.4); opacity: 0; }
}

/* Flash */
@keyframes lampFlicker {
  0%{opacity:0} 15%{opacity:1} 30%{opacity:0.6} 50%{opacity:1} 70%{opacity:0.85} 100%{opacity:1}
}
.lamp-card.is-on .lamp-bulb { animation: lampFlicker 0.45s ease-out; }

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
  .lamp-card { min-height: 320px; padding: 28px 20px 20px; }
  .lamp-scene { width: 180px; height: 220px; }
  .lamp-shade { width: 105px; height: 48px; }
  .lamp-shade-top { width: 48px; }
  .lamp-shade-fabric { width: 105px; height: 42px; }
  .lamp-shade-rim { width: 109px; }
  .lamp-stem { height: 60px; }
  .lamp-base-plate { width: 72px; height: 14px; }
  .lamp-cord-string { height: 36px; }
  .lamp-cord-pull { width: 11px; height: 11px; }
}
