/* ══════════════════════════════════════════════════════
   POSClothes — Shop CSS (New Template)
   ══════════════════════════════════════════════════════ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Noto Sans Thai', Arial, sans-serif;
}

body {
    background: #fff;
    color: #111;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===================================
   Header & Topbar
   =================================== */
.topbar {
    height: 36px;
    background: #f6f6f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 48px;
    font-size: 13px;
    color: #555;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-links a {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.topbar-links a:hover {
    color: #111;
}

.topbar-links a + a::before {
    content: '|';
    margin-right: 6px;
    color: #ccc;
}

header {
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: #111;
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 32px;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo h1 {
    font-size: 26px;
}

.logo p {
    font-size: 13px;
    color: #555;
    margin-top: 2px;
}

nav {
    display: flex;
    gap: 28px;
    font-size: 15px;
}

.icons {
    display: flex;
    gap: 18px;
    font-size: 22px;
    align-items: center;
}

.icon-btn {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-menu {
    display: none;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ee4d2d;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

/* ===================================
   Container & Layouts
   =================================== */
.container {
    max-width: 1180px;
    margin: auto;
    padding: 28px 20px;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    height: 420px;
    background: linear-gradient(90deg, #f4f1ec 0%, #f8f6f3 45%, #e5ded5 100%);
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 48% 52%;
    position: relative;
}

.hero-text {
    padding: 64px 56px;
}

.hero-text small {
    font-size: 18px;
    font-weight: bold;
}

.hero-text h2 {
    font-size: 48px;
    margin: 18px 0 8px;
}

.hero-text .script {
    font-size: 38px;
    font-style: italic;
    margin-bottom: 30px;
}

.features {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
    font-size: 14px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
}

.circle {
    width: 42px;
    height: 42px;
    border: 1px solid #ccc;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 26px;
    background: #111;
    color: #fff;
    border-radius: 999px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.hero-img, .hero-img-carousel {
    background: url("https://images.unsplash.com/photo-1529139574466-a303027c1d8b?q=80&w=1200") center/cover;
    position: relative;
    overflow: hidden;
}

.hero-img-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-img-slide.active {
    opacity: 1;
}

/* ===================================
   Categories
   =================================== */
.categories {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 24px;
    margin: 34px 0;
    text-align: center;
}

.cat img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    background: #eee;
    border: 1px solid #eee;
}

.cat p {
    margin-top: 10px;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.5;
}

/* ===================================
   Products
   =================================== */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 28px 0 20px;
}

.section-title h3 {
    font-size: 24px;
}

.products {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 22px;
}

.product {
    position: relative;
    display: block;
}

.product img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
}

.heart {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #111;
    color: #fff;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    font-size: 10px;
    text-align: center;
    font-weight: bold;
}

.product h4 {
    font-size: 14px;
    line-height: 1.5;
    margin: 12px 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price {
    font-weight: bold;
    margin-bottom: 8px;
}

.colors {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #111;
    border: 1px solid #ccc;
}

/* ===================================
   Benefits & Banners
   =================================== */
.benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 28px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 34px 0;
}

.benefit {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #eee;
}

.benefit:last-child {
    border-right: none;
}

.benefit span {
    font-size: 30px;
}

.benefit h4 {
    font-size: 16px;
}

.benefit p {
    font-size: 13px;
    color: #555;
}

.banners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 36px;
}

.banner {
    height: 210px;
    border-radius: 12px;
    padding: 44px;
    background: #f1eee9;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.banner h3 {
    font-size: 32px;
    margin-bottom: 8px;
}

.banner p {
    margin-bottom: 20px;
}

/* ===================================
   Footer
   =================================== */
footer {
    background: #fafafa;
    border-top: 1px solid #eee;
    padding: 42px 48px 20px;
}

.footer-grid {
    max-width: 1180px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1.5fr;
    gap: 34px;
}

footer h4 {
    margin-bottom: 14px;
}

footer p,
footer li {
    list-style: none;
    font-size: 14px;
    color: #555;
    line-height: 1.9;
}

.subscribe {
    display: flex;
    margin-top: 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 999px;
    overflow: hidden;
}

.subscribe input {
    flex: 1;
    border: none;
    padding: 14px 18px;
    outline: none;
}

.subscribe button {
    border: none;
    background: #111;
    color: #fff;
    padding: 0 22px;
    border-radius: 999px;
}

.copyright {
    text-align: center;
    margin-top: 34px;
    font-size: 13px;
    color: #777;
}

/* ===================================
   Cart Drawer (From old shop.css)
   =================================== */
.shop-cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000;
}
.shop-cart-drawer {
    position: absolute; right: 0; top: 0; width: 100%; max-width: 400px; height: 100%;
    background: #fff; display: flex; flex-direction: column;
}
.shop-cart-header {
    padding: 16px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center;
}
.shop-cart-header h3 { margin: 0; font-size: 18px; }
.shop-close-btn { background: none; border: none; font-size: 20px; cursor: pointer; }
.shop-cart-items { flex-grow: 1; overflow-y: auto; padding: 16px; }
.shop-cart-empty { text-align: center; color: #777; margin-top: 40px; }
.shop-cart-item { display: flex; gap: 12px; margin-bottom: 16px; border-bottom: 1px solid #eee; padding-bottom: 16px; }
.shop-cart-item-img { width: 60px; height: 60px; flex-shrink: 0; border: 1px solid #eee; border-radius: 4px; overflow: hidden; }
.shop-cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-cart-item-info { flex-grow: 1; }
.shop-cart-item-name { font-size: 14px; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-cart-item-price { color: #111; font-size: 14px; font-weight: bold; margin-bottom: 8px; }
.shop-cart-footer { padding: 16px; border-top: 1px solid #eee; }
.shop-cart-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: bold; margin-bottom: 16px; }
.shop-checkout-btn { width: 100%; background: #111; color: white; border: none; padding: 14px; border-radius: 999px; font-size: 16px; font-weight: bold; cursor: pointer; }

/* ===================================
   Responsive (Mobile View)
   =================================== */
@media (max-width: 900px) {
    header, .topbar {
        padding: 0 12px;
    }

    .topbar {
        height: auto;
        min-height: 32px;
        flex-direction: column;
        gap: 0;
        padding: 6px 12px;
    }

    .topbar-left {
        font-size: 11px;
        text-align: center;
        margin-bottom: 4px;
    }

    .topbar-links {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 12px;
        font-size: 11px;
    }

    .topbar-links a {
        text-decoration: none;
        color: #555;
    }
    
    .hamburger-menu {
        display: flex;
    }

    nav {
        display: none;
    }

    nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 100;
        border-top: 1px solid #eee;
    }
    
    .hero {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .hero-img,
    .hero-img-carousel {
        height: 280px;
    }
    
    .categories {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits,
    .banners,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .benefit {
        border-right: none;
        justify-content: flex-start;
    }
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    animation: shopSlideUp 0.3s ease-out forwards;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pwa-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
}

.pwa-banner-text strong {
    font-size: 15px;
    color: #111;
}

.pwa-banner-text span {
    font-size: 13px;
    color: #666;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-btn-install {
    background: #6C63FF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.pwa-btn-dismiss {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

@media (max-width: 600px) {
    .pwa-banner-icon { width: 40px; height: 40px; }
    .pwa-banner-text strong { font-size: 14px; }
    .pwa-banner-text span { font-size: 12px; }
    .pwa-btn-install { padding: 6px 12px; font-size: 13px; }
}
