/* ================================================
   ILO ROBOT - MODERN SHOP STYLES
   Minimalist, Clean, Apple-inspired
   ================================================ */

:root {
    /* Colors */
    --ilo-blue: #24b4b1;
    --ilo-blue-hover: #1d9996;
    --ilo-black: #17272d;
    --ilo-dark-grey: #4a5568;
    --ilo-grey: #8d9da8; /* Softer text */
    --ilo-light-grey: #e2e8f0;
    --ilo-white: #ffffff;
    --ilo-bg-light: #f6f9fc;
    --ilo-bg-card: #ffffff;

    /* Gradients */
    --ilo-gradient-accent: linear-gradient(135deg, #24b4b1 0%, #1d9996 100%);
    --ilo-gradient-hero: linear-gradient(180deg, #f1f7fb 0%, #ffffff 100%);
    
    /* Shadows & Effects */
    --ilo-shadow-sm: 0 2px 8px rgba(23, 39, 45, 0.04);
    --ilo-shadow-md: 0 12px 30px rgba(23, 39, 45, 0.06);
    --ilo-shadow-hover: 0 20px 40px rgba(23, 39, 45, 0.12);
    --ilo-glass: blur(12px);
    
    /* Spacing & Radius */
    --ilo-radius-sm: 12px;
    --ilo-radius-md: 24px;
    --ilo-radius-lg: 32px;
    --ilo-spacing-layout: 80px;

    /* Transitions */
    --ilo-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'poppins', sans-serif;
    background-color: var(--ilo-bg-light);
    color: var(--ilo-black);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* ---------- Typography ---------- */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s var(--ilo-ease);
    cursor: pointer;
    border: none;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn--primary {
    background: var(--ilo-gradient-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(36, 180, 177, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(36, 180, 177, 0.4);
}

.btn--full-width {
    width: 100%;
}

.btn--ghost {
    background: transparent;
    border: 2px solid var(--ilo-light-grey);
    color: var(--ilo-black);
}

.btn--ghost:hover {
    background: var(--ilo-white);
    border-color: var(--ilo-black);
}

/* ---------- Layout Common ---------- */
.shop-wrapper, .product-detail-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 100px;
}

/* ---------- HERO SECTION ---------- */
.shop-hero {
    position: relative;
    padding: 160px 20px 80px;
    text-align: center;
    background: var(--ilo-gradient-hero);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    margin-bottom: 40px;
}

.shop-hero__title {
    font-size: 3.5rem;
    color: var(--ilo-black);
    margin-bottom: 15px;
}

.shop-hero__subtitle {
    font-size: 1.1rem;
    color: var(--ilo-grey);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- CART PANEL (Floating Bottom Bar) ---------- */
.cart-panel {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(200%); /* Hidden by default down */
    width: auto;
    min-width: 350px;
    max-width: 90%;
    background: rgba(22, 33, 38, 0.95); /* Dark theme for contrast */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255, 0.1);
    border-radius: 100px;
    padding: 12px 12px 12px 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 900;
    margin: 0;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.cart-panel.is-visible {
    transform: translateX(-50%) translateY(0);
}

.cart-panel__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-panel__content h2 {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: rgba(255,255,255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.cart-panel__content p {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.cart-panel .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
}

/* On mobile */
@media (max-width: 600px) {
    .cart-panel {
        bottom: 15px;
        width: 90%;
        min-width: unset;
        max-width: 90%;
        padding: 8px 12px;
        gap: 10px;
    }
    
    .cart-panel__content h2 {
        font-size: 0.75rem;
    }

    .cart-panel__content p {
        font-size: 0.9rem;
    }

    .cart-panel .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* ---------- CATEGORIES & TITLES ---------- */
.category-title {
    font-size: 1.75rem;
    margin: 60px 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ilo-light-grey);
    display: inline-block;
    color: var(--ilo-black);
}

/* ---------- PRODUCT GRID ---------- */
.modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
}

/* ---------- PRODUCT CARD ---------- */
.modern-card {
    background: var(--ilo-bg-card);
    border-radius: var(--ilo-radius-md);
    transition: all 0.4s var(--ilo-ease);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.modern-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--ilo-shadow-hover);
}

.modern-card__img-container {
    background: #f8fafc;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.modern-card__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--ilo-radius-sm);
    transition: transform 0.6s var(--ilo-ease);
    mix-blend-mode: multiply; /* Helps integrate png with bg */
}

.modern-card:hover .modern-card__img {
    transform: scale(1.1);
}

.modern-card__content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.modern-card__title {
    font-size: 1.2rem;
    color: var(--ilo-black);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.modern-card:hover .modern-card__title {
    color: var(--ilo-blue);
}

.modern-card__price {
    font-size: 1.1rem;
    color: var(--ilo-dark-grey);
    font-weight: 500;
    margin-bottom: 20px;
}

.modern-card__actions {
    margin-top: auto;
}

.placeholder-image {
    color: var(--ilo-grey);
    font-size: 2rem;
    font-weight: bold;
}

/* ---------- PRODUCT DETAIL PAGE ---------- */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
    margin-top: 40px;
}

.detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-image-frame {
    background: var(--ilo-white);
    border-radius: var(--ilo-radius-lg);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ilo-shadow-sm);
    min-height: 400px;
}

.main-image-frame img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.thumbnails-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.thumb {
    width: 80px;
    height: 80px;
    background: var(--ilo-white);
    border-radius: var(--ilo-radius-sm);
    padding: 10px;
    object-fit: contain;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.thumb:hover, .thumb.active {
    border-color: var(--ilo-blue);
    transform: scale(1.05);
}

.detail-info {
    padding-top: 20px;
}

.detail-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 16px;
}

.detail-price {
    font-size: 2rem;
    color: var(--ilo-blue);
    font-weight: 600;
    margin-bottom: 30px;
}

.detail-desc-card {
    background: var(--ilo-white);
    padding: 30px;
    border-radius: var(--ilo-radius-md);
    box-shadow: var(--ilo-shadow-sm);
    color: var(--ilo-dark-grey);
    line-height: 1.7;
    margin-bottom: 40px;
}

.detail-actions {
    display: flex;
    gap: 20px;
}

.sub-products-section {
    margin-top: 80px;
    border-top: 1px solid var(--ilo-light-grey);
    padding-top: 40px;
}

@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .shop-hero__title { font-size: 2.5rem; }
}

/* ---------- MOBILE RESPONSIVE TWEAKS ---------- */
@media (max-width: 768px) {
    .shop-hero {
        padding: 100px 20px 40px !important;
    }
    
    .shop-hero__title {
        font-size: 2rem !important;
    }
    
    .main-image-frame {
        padding: 20px;
        min-height: 280px;
    }
    
    .main-image-frame img {
        max-height: 300px;
    }
    
    .detail-title {
        font-size: 2rem;
    }
    
    .detail-price {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .detail-desc-card {
        padding: 20px;
        margin-bottom: 30px;
    }

    .detail-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .shop-wrapper, .product-detail-wrapper {
        padding: 0 16px 100px;
    }

    .thumbnails-row {
        gap: 10px;
        flex-wrap: wrap; 
    }
    
    .thumb {
        width: 60px;
        height: 60px;
    }
    
    /* Cart panel mobile optimization */
    .cart-panel {
        flex-direction: row; /* Keep row for compactness */
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 10px 14px; /* Reduced padding */
        border-radius: 100px; /* Pill shape */
        width: 90%; /* Safe width */
        max-width: 380px;
        left: 50%; /* Center properly */
        bottom: 20px;
        transform: translateX(-50%) translateY(200%); 
        margin: 0;
    }
    
    .cart-panel.is-visible {
        transform: translateX(-50%) translateY(0);
    }
    
    .cart-panel__content {
        align-items: flex-start;
        text-align: left;
    }
    
    .cart-panel__content h2 {
        margin-bottom: 2px;
        font-size: 10px;
    }

    .cart-panel__content p {
        font-size: 14px;
    }
    
    .cart-panel .btn {
        width: auto;
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* Sub-products nice grid on mobile */
    .modern-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modern-card__img-container {
        height: 220px;
    }
}
