/* ==========================
   1. General Styles
   ========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    display: flex;
    justify-content: center;
    background-color: #FCBBD3;
}

/* ==========================
   2. Layout Structure
   ========================== */
.container {
    display: flex;
    width: 90%;
    max-width: 1920px;
    min-height: 100vh;
}

/* ==========================
   3. Sidebar & Navigation (Left Panel)
   ========================== */
.sidebar {
    width: 27%;
    max-width: 500px;
    margin-right: 50px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.logo {
    margin-top: 50px;
}

.logo img {
    width: 100%; 
    display: block;
}

.address-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; 
    height: auto; 
    margin-top: 30px;
}

.address-container img {
    width: 100%; 
    max-width: unset;
    display: block;
}

/* Address Box Link */
.address-link {
    display: block;
    width: 100%;
    text-align: center;
}

/* Default Address Image */
.address-img {
    width: 100%;
    transition: opacity 0.3s ease-in-out;
}

/* Hover Effect - Swap to Hover Image */
.address-link:hover .address-img {
    content: url("images/address-box-hover.png");
}

/* ==========================
   4. Social Media Links
   ========================== */
.socials {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.socials-wrapper {
    background-image: url("images/socials-base.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    width: 100px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Social Icons */
.social-icon {
    height: 35px;
    width: 35px;
    transition: opacity 0.3s ease-in-out;
}

/* Hover Effect - Change Icon on Hover */
.ig:hover {
    content: url("images/socials-ig-hover.png");
}

.fb:hover {
    content: url("images/socials-fb-hover.png");
}

/* ==========================
   5. Footer
   ========================== */
.denby-design {
    margin-top: auto; 
    text-align: center;
    font-family: "Inter", sans-serif;
    font-weight: 800; 
    font-size: 14px;
    padding: 20px;
}

.denby-design a {
    text-decoration: none;
    color: black;
    font-weight: 900;
}

.denby-design a:hover {
    color: #B3A2FF;
}

/* ==========================
   6. Main Content & Features (Right Panel)
   ========================== */
.main-content {
    display: flex;
    flex-direction: column;
    width: 73%;
    position: relative;
}

/* Just In Feature (Horizontal Scroll) */
.just-in {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
    background: white;
    margin: 50px 0px 0px 0px;
    padding-top: 50px;
}

.slider-container {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

.slider {
    display: flex;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    min-height: 725px;
    padding-bottom: 30px;
}

.slide {
    min-width: 451px;
    height: 725px;
    background: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    padding: 20px;
    box-sizing: border-box;
    margin-right: 25px;
}

/* Ensure images inside slides fit properly */
.slide img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.fixed-slide {
    position: sticky;
    left: 0;
    z-index: 10;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fixed-slide img {
    object-fit: contain;
    transform: scale(0.8);
}

/* Dynamic Slide Styling */
.item-slide {
    background-image: url("images/justin-slide-back.png");
    background-size: 100% 100%;
    background-position: center;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 25px;
    position: relative;
}

.slide-title {
    font-size: 35px;
    font-weight: bold;
    color: #000;
    text-align: center;
    max-width: 90%;
    margin-inline: auto;
    margin-bottom: 15px;
    margin-top: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
    min-height: 2.6em;
    line-height: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}  

.slide-img {
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

.slide-price {
    font-size: 40px;
    font-weight: 800;
    color: #000;
    margin-bottom: auto;
}

.slide-basket-action {
    position: absolute;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Custom Scrollbar for Just In Slider */
.slider::-webkit-scrollbar {
    height: 28px; /* Makes it taller */
}
  
.slider::-webkit-scrollbar-track {
    background: #ffe0ef;
    border-radius: 10px;
}
  
.slider::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #b3a2ff, #fcbbd3);
    border-radius: 10px;
    border: 2px solid white;
}
  
.slider::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to right, #a08df5, #fca0c0);
} 

/* ==========================
   7. Product Grid (Vertical Scroll)
   ========================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    background: white;
    padding: 25px 25px;
    margin-top: 50px;
}  

.product {
    background: #ddd;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 10px 0px 0px;
}

.product-grid-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
}

.product-tile-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.price-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 6px 10px;
    font-size: 16px;
    border-radius: 6px;
    font-weight: bold;
}

.floating-checkout-wrapper {
    position: sticky;
    top: 30px;
    z-index: 20;
    margin-bottom: 30px;
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-checkout-btn {
    width: 300px;
    height: auto;
    max-width: 100%;
    cursor: pointer;
    transition: transform 0.2s ease;
}  
  
  .floating-checkout-btn:hover {
    transform: scale(1.15);
}

/* ==========================
   8. Interactive Elements
   ========================== */
.spin-btn {
    transition: opacity 0.2s ease-in-out;
    cursor: pointer;
}

.spin-btn:hover {
    content: url("images/spin-the-rack-hover.png");
}

.checkout-btn {
    display: block; 
    margin: 0 auto;
    transition: opacity 0.3s ease-in-out;
    margin-bottom: 75px;
}

.checkout-btn:hover {
    content: url("images/checkout-hover.png");
}

/* Add to Basket Label */
.add-to-basket-label {
    color: #FF4B32;
    font-size: 18px;
    font-weight: bold;
    margin-right: 10px;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
}

/* Shopping Bag Button */
.shopping-bag-btn {
    width: 50px;
    height: auto;
    transition: opacity 0.3s ease-in-out;
}

/* Hover Effect */
.basket-action {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
  
/* When hovering either the label or icon, affect both */
.basket-action:hover .add-to-basket-label {
    color: black;
}
  
/* Hover Effect - Swap to Hover Image */
.shopping-bag-btn {
    width: 50px;
    height: auto;
    transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;
}

/* On hover of the whole basket-action group */
.basket-action:hover .shopping-bag-btn {
    filter: grayscale(100%) brightness(0);
    opacity: 1;
}
  
/* ==========================
   9. Popups
   ========================== */
/* Combo Timer Popup */
.combo-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 1500;
}

.combo-content {
    transform-origin: bottom right;
}

.combo-timer-inline {
    font-size: 14px;
    color: #ccc;
    margin-top: 4px;
}

.combo-popup.final-seconds {
    animation: flash-red 0.8s infinite alternate !important
}

@keyframes flash-red {
    0% { background-color: #000; }
    100% { background-color: #6b0000; }
}

.combo-popup.bounce {
    animation: bounce-pop 0.6s ease;
}

@keyframes bounce-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    60%  { transform: scale(0.9); }
    80%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes bounceIn {
    0% {
      transform: scale(0.7);
      opacity: 0;
    }
    60% {
      transform: scale(1.2);
      opacity: 1;
    }
    100% {
      transform: scale(1);
    }
}
  
.combo-summary.bounce {
    animation: bounceIn 0.6s ease;
}  

/* Show the popup */
.combo-popup.visible {
    opacity: 1;
    transform: translateY(0);
    display: flex;
}

/* Combo Image */
.combo-img {
    display: block;
    margin: 0 auto 15px auto;
    width: 100%;
    max-width: 100px;
    height: auto;
    flex-shrink: 0;
}

/* Combo Text */
.combo-text {
    font-size: 16px;
    font-weight: bold;
}

.combo-summary {
    font-size: 18px;
    font-weight: bold;
    background-color: white;
    color: #FCBBD3;
    margin-bottom: 10px;    
    margin-bottom: 15px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 12px rgba(0, 32, 0, 0.5);
    width: fit-content;
    margin-inline: auto;
}

/* Hide Popup by Default */
.hidden {
    display: none !important;
}

/* Item Details Popup */
.item-popup {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    height: auto;
    background: url("images/popup-back.png") no-repeat center center;
    background-size: 100% 100%;
    color: red;
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
    display: none;
    overflow-y: auto;
    border: 10px solid #002000;
}

#popupTitle {
    color: #FCBBD3;
    font-size: 40px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    margin-bottom: 25px;
}

/* Show Popup */
.item-popup.visible {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

/* Checkout Popup */
.checkout-popup {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    height: auto;
    background: url("images/popup-back.png") no-repeat center center;
    background-size: 100% 100%;
    color: red;
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
    display: none;
    overflow-y: auto;
    border: 10px solid #002000;
}

.checkout-popup.visible {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

/* Popup Content */
.popup-content {
    max-width: 1300px;
    width: 100%;
    max-height: 90%;
    margin: auto;
    text-align: center;
  }

/* Close Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #FCBBD3;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}
  
.close-btn:hover {
    transform: scale(1.3) rotate(10deg);
    color: #B3A2FF;/
}

/* Basket Button */
.popup-basket-action {
    justify-content: center;
    margin-top: 30px;
}

.popup-basket-action .add-to-basket-label {
    font-size: 20px;
}

.popup-basket-action .shopping-bag-btn {
    width: 60px;
}

.popup-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 20px auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ==========================
   10. Cart Styling
   ========================== */
.cart-list {
    display: inline-flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
}
  
.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.75);
    padding: 10px;
    border-radius: 8px;
}
  
.cart-item-img {
    width: 80px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
  
.cart-item-info {
    flex-grow: 1;
    text-align: left;
}
  
.cart-item-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #B3A2FF;
}
  
.cart-item-price {
    font-size: 16px;
    color: #FFC857;
} 

.clear-basket-btn {
    background-color: #B3A2FF;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    margin-top: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
  
  .clear-basket-btn:hover {
    background-color: #9b88f0;
}  

.checkout-discount {
    font-weight: bold;
    font-size: 18px;
}

#cartTotal strong {
    font-size: 24px;
    color: #B3A2FF;
    display: block;
    margin-top: 10px;
}

#cartTotal p strong {
    font-weight: bold;
}  

/* ==========================
   11. Responsive Design Adjustments
   ========================== */
   @media (max-width: 1200px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .sidebar {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        margin-right: 0;
        position: relative;
        z-index: 1;
    }

    .socials {
        justify-content: center;
    }

    .denby-design {
        width: 100%;
        text-align: center;
    }

    .main-content {
        width: 95%; 
        position: relative;
        z-index: 2;
    }

    .just-in {
        height: auto;
        min-height: 400px;
        max-height: none;
    }

    .slider-container {
        height: auto;
        max-height: none;
    }

    .slide {
        min-width: 343px;
        width: 100%;
        max-width: 343px;
        padding: 15px;
        margin-right: 15px;
        box-sizing: border-box;
    }

    .fixed-slide {
        width: 343px;
        min-width: 343px;
        max-width: 343px;
        height: auto;
        position: static;
    }

    .slider {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
   }