/* --- 1. OVERLAY (NO BLUR, NO TRANSITION) --- */
#cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 15000;
    display: none; /* Snap hide */
    pointer-events: none;
}

#cart-overlay.open {
    display: block !important; /* Snap show */
    pointer-events: auto;
}

/* --- 2. THE CART SIDEBAR (NO MOTION) --- */
#cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(500px, 90vw);
    background: #080808;
    border-left: 2px solid #15fd00;
    z-index: 2000000;
    display: none; /* Hidden by default */
    transform: none !important; /* Kill all sliding */
    transition: none !important; /* Kill all animation */
}

#cart-sidebar.open {
    display: block !important; /* Pop open instantly */
}

/* --- 3. PRODUCT PREVIEW PANEL (NO POP ANIMATION) --- */
#product-detail-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Fixed center */
    width: 90vw;
    max-width: 1100px;
    max-height: 85vh;
    background: #080808;
    border: 1px solid #15fd00;
    border-radius: 20px;
    z-index: 25000;
    padding: 30px;
    display: none; /* Snap hide */
    overflow-y: auto;
    color: white;
    transition: none !important;
}

#product-detail-panel.open {
    display: block !important; /* Snap show */
}

/* --- 4. SHOP GRID & CARDS (STILL) --- */
#product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.product-card {
    background: #0d0d0d;
    padding: 15px;
    border-radius: 15px;
    border: 1px solid #1a1a1a;
    cursor: pointer;
}

.product-card:hover {
    border-color: #15fd00;
    /* Removed transform/scale for stability */
}

.product-preview-box {
    width: 100%;
    height: 200px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.price-tag {
    color: #15fd00;
    font-family: monospace;
    font-weight: bold;
    margin: 5px 0 0 0;
}

/* --- 5. CONFIGURATOR & INPUTS --- */
.configurator-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 850px) {
    .configurator-grid { grid-template-columns: 1fr; }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 15px;
}

.input-field {
    width: 100%;
    padding: 12px;
    background: #111;
    border: 1px solid #222;
    color: #fff;
    border-radius: 6px;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: none !important;
}

.add-to-cart-btn {
    width: 100%;
    background: #15fd00;
    color: #000;
    border: none;
    padding: 18px;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
}

.close-panel {
    background: none;
    border: none;
    color: #888;
    font-size: 32px;
    cursor: pointer;
}

/* --- 6. CHECKOUT FORM --- */
.checkout-form-grid {
    display: grid;
    gap: 15px;
}

.total-box {
    background: #111;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #15fd00;
}

/* CART SIDEBAR */
#cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(560px, 80vw);
    height: 100dvh;
    background: #080808;
    border-left: 2px solid #15fd00;
    z-index: 2000;
    
    transform: translateX(100%);
    transition: transform .35s ease;
    
    /* IMPORTANT – fixes page stretching */
    pointer-events: none;
    visibility: hidden;
}

/* OPEN */
#cart-sidebar.open {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
}

#cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 1500;
    display: none;
}

#cart-overlay.active {
    display: block;
}

/* Mobile */
@media (max-width: 600px) {
    #cart-sidebar {
        width: 90vw;
    }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 1100px) {
    #cart-sidebar {
        width: 75vw;
    }
}

/* Desktop */
@media (min-width: 1101px) {
    #cart-sidebar {
        width: 560px;
    }
}


/* Overlay */
#cartOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 900;
}

/* Drawer */
#cartDrawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  background: #111; /* modern industrial vibe */
  color: white;
  width: 80%;              /* default mobile */
  max-width: 550px;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.24,.8,.35,1);
  z-index: 999;
  box-shadow: -10px 0 30px rgba(0,0,0,.5);
}

/* Tablet */
@media (min-width: 600px) {
  #cartDrawer {
    width: 65%;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  #cartDrawer {
    width: 45%;
  }
}

/* Active state */
.open #cartDrawer {
  transform: translateX(0);
}

.open #cartOverlay {
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.cart-header {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  font-size: 22px;
  background: #181818;
  border-bottom: 1px solid #333;
}

#closeCart {
  cursor: pointer;
  font-size: 30px;
}

/* Make [edit] prettier if you want */
.cart-content p {
  margin: 20px;
  color: #bbb;
}
