@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* =========================================
   WAI STORE - HOME DEVICES
   (navbar styles come from navbar.css)
========================================= */

:root {
    --orange: #ff6b00;
    --orange-dark: #e85f00;
    --orange-light: #fff3ea;
    --blue: #1261c9;
    --navy: #12315b;
    --navy-deep: #0c2240;
    --text: #172337;
    --muted: #718096;
    --background: #f5f7fb;
    --white: #ffffff;
    --border: #e5eaf1;
    --shadow: 0 8px 26px rgba(18, 49, 91, 0.07);
    --shadow-hover: 0 18px 40px rgba(18, 49, 91, 0.14);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--background);
    overflow-x: hidden;
    padding-top: 80px; /* space for the fixed navbar */
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: #f0f2f6; }
::-webkit-scrollbar-thumb { background: #c8d3e3; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* TOP ACCENT LINE */
body::before {
    content: "";
    position: fixed;
    z-index: 2000;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--orange), #ff9a52, var(--orange));
    background-size: 200%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* =========================================
   HERO
========================================= */
.shop-header {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    width: 92%;
    max-width: 1350px;
    min-height: 420px;
    margin: 22px auto 0;
    padding: 50px 6%;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(ellipse at 92% 10%, rgba(255, 107, 0, 0.25) 0%, transparent 35%),
        radial-gradient(ellipse at 5% 90%, rgba(18, 97, 201, 0.3) 0%, transparent 40%),
        linear-gradient(130deg, #0c2d55 0%, #123f79 55%, #1769b9 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(18, 49, 91, 0.18);
}

.hero-orb { position: absolute; border-radius: 50%; pointer-events: none; animation: floatOrb 7s ease-in-out infinite; }
.hero-orb--1 { top: -80px; right: -60px; width: 340px; height: 340px; border: 50px solid rgba(255, 255, 255, 0.055); }
.hero-orb--2 { bottom: -50px; left: 38%; width: 180px; height: 180px; background: rgba(255, 107, 0, 0.08); animation-delay: -2s; }
.hero-orb--3 { top: 20px; left: 42%; width: 80px; height: 80px; background: rgba(255, 154, 82, 0.12); animation-delay: -4s; }

@keyframes floatOrb {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-18px) scale(1.04); }
}

.shop-header-content { position: relative; z-index: 2; }

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 20px;
    padding: 7px 16px;
    color: white;
    background: var(--orange);
    border-radius: 25px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
}

.shop-header h1 {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 0 18px;
    color: white;
    font-size: clamp(34px, 4.2vw, 56px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;
}
.shop-header h1 span { color: #ff9a52; }

.shop-header p {
    position: relative;
    z-index: 2;
    max-width: 500px;
    color: #dce8f7;
    font-size: 13px;
    line-height: 1.95;
}

.hero-actions { display: flex; align-items: center; gap: 14px; margin-top: 26px; }

.hero-shop-button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 26px;
    color: white;
    background: var(--orange);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.35);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.hero-shop-button svg { transition: transform var(--transition); }
.hero-shop-button:hover { background: var(--orange-dark); box-shadow: 0 10px 28px rgba(255, 107, 0, 0.45); transform: translateY(-2px); }
.hero-shop-button:hover svg { transform: translateX(4px); }

.hero-stats { display: flex; align-items: center; gap: 22px; margin-top: 32px; }
.hero-stat { text-align: left; }
.hero-stat strong { display: block; color: white; font-size: 22px; font-weight: 800; line-height: 1.1; }
.hero-stat span { color: rgba(220, 232, 247, 0.75); font-size: 10px; font-weight: 500; letter-spacing: 0.5px; }
.hero-stat-divider { width: 1px; height: 34px; background: rgba(255, 255, 255, 0.2); border-radius: 2px; }

.shop-header-image {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 310px;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.shop-header-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* =========================================
   SECTION HEADERS
========================================= */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }

.section-header-text h2 { color: var(--navy); font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.6px; }
.section-header-text h2::after {
    content: "";
    display: block;
    width: 46px; height: 4px;
    margin-top: 12px;
    background: linear-gradient(90deg, var(--orange), #ff9a52);
    border-radius: 5px;
}
.section-header-text p { margin-top: 6px; color: var(--muted); font-size: 12px; }

/* =========================================
   CATEGORIES
========================================= */
.shoppingsection1 {
    width: 92%;
    max-width: 1350px;
    margin: 0 auto;
    padding: 70px 0 80px;
    scroll-margin-top: 95px;
}

.categories-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(18, 49, 91, 0.05);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    color: var(--text);
}

.category-card::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--orange), #ff9a52);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.category-card:hover::after { transform: scaleX(1); }
.category-card:hover { border-color: rgba(255, 107, 0, 0.3); box-shadow: var(--shadow-hover); transform: translateY(-6px); }

.category-count-badge {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 3;
    padding: 4px 10px;
    color: var(--orange);
    background: var(--orange-light);
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.category-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    padding: 20px;
    overflow: hidden;
    background: linear-gradient(145deg, #f7f9fc, #eef1f7);
    border-bottom: 1px solid #edf0f5;
}
.category-card-image img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.35s ease; }
.category-card:hover .category-card-image img { transform: scale(1.08); }

.category-fallback-icon { font-size: 66px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1)); transition: transform 0.35s ease; }
.category-card:hover .category-fallback-icon { transform: scale(1.1) rotate(-5deg); }

.category-card-content { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.category-card-content h3 { margin: 0 0 8px; color: var(--navy); font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.category-card-content p { margin: 0 0 16px; color: var(--muted); font-size: 11.5px; line-height: 1.8; }

.category-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
    transition: gap var(--transition);
}
.category-card:hover .category-card-link { gap: 10px; }
.category-card-link svg { flex-shrink: 0; }

/* =========================================
   PRODUCTS
========================================= */
.products-section {
    width: 100%;
    padding: 70px 4%;
    background: var(--white);
    scroll-margin-top: 95px;
}
.products-section:nth-of-type(even) { background: linear-gradient(180deg, #f7f9fc 0%, #f0f3f9 100%); }

.products-title { width: 100%; max-width: 1300px; margin: 0 auto 36px; text-align: center; }
.products-title h2 { color: var(--navy); font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -0.5px; }
.products-title h2::after {
    content: "";
    display: block;
    width: 44px; height: 4px;
    margin: 12px auto 0;
    background: linear-gradient(90deg, var(--orange), #ff9a52);
    border-radius: 5px;
}
.products-title p { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.8; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 18px rgba(18, 49, 91, 0.04);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.product-card:hover { border-color: rgba(255, 107, 0, 0.25); box-shadow: var(--shadow-hover); transform: translateY(-6px); }

.product-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 235px;
    padding: 20px;
    overflow: hidden;
    background: #fafbfd;
    border-bottom: 1px solid #f0f2f6;
}
.product-image a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.product-image img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.product-card:hover .product-image img { transform: scale(1.07); }

.product-image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 16px;
    background: linear-gradient(to top, rgba(12, 34, 64, 0.55) 0%, transparent 55%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}
.product-card:hover .product-image-overlay { opacity: 1; }

.overlay-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    transform: translateY(8px);
    transition: transform var(--transition), background var(--transition);
    pointer-events: auto;
}
.product-card:hover .overlay-view-btn { transform: translateY(0); }
.overlay-view-btn:hover { background: var(--orange); border-color: var(--orange); color: white; }

.no-image-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; color: #b0bcd0; }
.no-image-placeholder span { font-size: 38px; }
.no-image-placeholder p { font-size: 11px; }

.product-info { display: flex; flex: 1; flex-direction: column; padding: 18px; }

.product-info h3 {
    display: -webkit-box;
    width: 100%;
    min-height: 46px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.product-info h3 a { color: inherit; transition: color var(--transition); }
.product-info h3 a:hover { color: var(--orange); }

.product-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 0 0 18px;
    color: var(--orange);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.price-currency { color: var(--muted); font-size: 12px; font-weight: 500; }

.add-cart-form { display: flex; width: 100%; margin-top: auto; }

.add-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    color: white;
    background: var(--orange);
    border: 1px solid var(--orange);
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.add-cart:hover { background: var(--orange-dark); box-shadow: 0 7px 18px rgba(255, 107, 0, 0.28); transform: translateY(-1px); }
.add-cart:active { transform: scale(0.97); }

.add-cart--success { background: #1a8a4e !important; border-color: #1a8a4e !important; }

.cart-spinner {
    display: inline-block;
    width: 13px; height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.no-products {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 50px 20px;
    color: var(--muted);
    background: white;
    border: 1.5px dashed #d5deea;
    border-radius: var(--radius-md);
    text-align: center;
}
.no-products span { font-size: 36px; }
.no-products p { font-size: 13px; }

.section-back-link { display: flex; justify-content: center; margin-top: 40px; }
.section-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    color: var(--navy);
    background: white;
    border: 1px solid var(--border);
    border-radius: 25px;
    font-size: 11px;
    font-weight: 600;
    transition: all var(--transition);
}
.section-back-link a:hover { color: white; background: var(--orange); border-color: var(--orange); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255, 107, 0, 0.25); }

/* =========================================
   CART TOAST
========================================= */
.cart-message {
    position: fixed;
    top: 92px;
    right: 24px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(360px, calc(100% - 32px));
    padding: 14px 20px;
    color: white;
    background: var(--navy);
    border-left: 4px solid var(--orange);
    border-radius: var(--radius-sm);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.6;
    animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.cart-message--hide { animation: toastOut 0.35s ease forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}

/* =========================================
   FOOTER (fallback - footer.css loads after and wins)
========================================= */
.footer { color: white; background: #0c2240; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.footer-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.3fr;
    gap: 50px;
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 55px 5%;
}
.footer-brand h3 { margin-bottom: 14px; color: var(--orange); font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.footer-brand p { max-width: 290px; color: #bfcfe0; font-size: 12px; line-height: 2; }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4, .footer-contact h4 { margin-bottom: 6px; color: #ff9145; font-size: 13.5px; font-weight: 700; letter-spacing: 0.3px; }
.footer-links a { color: #c4d3e5; font-size: 12px; transition: color var(--transition), padding-left var(--transition); }
.footer-links a:hover { color: white; padding-left: 4px; }
.footer-contact p { color: #c4d3e5; font-size: 12px; line-height: 1.9; }
.footer-bottom { padding: 18px 5%; background: rgba(0, 0, 0, 0.18); text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.footer-bottom p { color: #8fa8c0; font-size: 11px; }

/* =========================================
   TABLET (max 1050px)
========================================= */
@media (max-width: 1050px) {
    .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
    .categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .product-image { height: 210px; }
    .footer-content { gap: 30px; }
}

/* =========================================
   PHONES (max 760px) - navbar is ~115px tall
========================================= */
@media (max-width: 760px) {
    body { padding-top: 115px; }
    html { scroll-padding-top: 125px; }
    .shoppingsection1, .products-section { scroll-margin-top: 125px; }
    .cart-message { top: auto; right: 14px; bottom: 16px; }
}

/* =========================================
   MOBILE (max 700px)
========================================= */
@media (max-width: 700px) {

    .shop-header {
        grid-template-columns: 1fr;
        gap: 22px;
        width: 92%;
        min-height: auto;
        margin-top: 16px;
        padding: 32px 24px;
        border-radius: 18px;
    }
    .shop-header h1 { font-size: clamp(30px, 8vw, 44px); letter-spacing: -0.8px; }
    .shop-header p { font-size: 13px; }
    .shop-header-image { height: auto; min-height: 190px; }
    .hero-stats { gap: 14px; }
    .hero-stat strong { font-size: 18px; }
    .hero-stat span { font-size: 11px; }

    .shoppingsection1 { width: 92%; padding: 45px 0 55px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .category-card-image { height: 145px; padding: 12px; }
    .category-card-content { padding: 14px; }
    .category-card-content h3 { font-size: 13.5px; }
    .category-card-content p { font-size: 11.5px; }
    .category-card-link { font-size: 12px; }

    .products-section { padding: 46px 4%; }
    .products-title { margin-bottom: 26px; }
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
    .product-image { height: 165px; padding: 12px; }
    .product-info { padding: 13px; }
    .product-info h3 { min-height: 42px; font-size: 12.5px; }
    .product-price { font-size: 17px; margin-bottom: 13px; }
    .add-cart { min-height: 44px; font-size: 12px; }

    .footer-content { grid-template-columns: 1fr; gap: 28px; padding: 40px 7%; }
}

/* =========================================
   SMALL PHONES (max 380px)
========================================= */
@media (max-width: 380px) {
    .categories-grid { gap: 10px; }
    .category-card-image { height: 125px; }
    .products-grid { gap: 10px; }
    .product-image { height: 140px; padding: 8px; }
    .product-info { padding: 10px; }
    .product-price { font-size: 15px; }
    .add-cart { font-size: 11px; gap: 5px; }
}

/* =========================================
   ACCESSIBILITY
========================================= */
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 3px solid rgba(18, 97, 201, 0.4);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}