/* =========================================
   WAI STORE - PHONES PAGE
   (navbar styles come from navbar.css)
========================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: Arial, sans-serif;
    background-color: #f5f7fa;
    color: #102a43;
    overflow-x: hidden;
    padding-top: 80px; /* space for the fixed navbar */
}

a { text-decoration: none; }
img { max-width: 100%; display: block; }

/* CART MESSAGE */
.cart-message {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1769d1;
    color: white;
    padding: 15px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* =========================
   HERO
========================= */
.Hero {
    width: 100%;
    height: 460px;
    display: grid;
    grid-template-columns: 45% 55%;
    background-color: #0c2d63;
    overflow: hidden;
}

.hero-content {
    padding: 40px 7%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.hero-label {
    width: fit-content;
    padding: 8px 18px;
    background-color: #ff6b00;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 15px;
}

.hero-content h1 { font-size: 48px; line-height: 1.05; margin-bottom: 15px; color: white; }

.hero-content p {
    max-width: 500px;
    font-size: 15px;
    line-height: 1.5;
    color: #e8eef7;
    margin-bottom: 20px;
}

.hero-buttons a {
    display: inline-block;
    background-color: #ff6b00;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    transition: 0.3s;
}
.hero-buttons a:hover { background-color: #ff8129; transform: translateY(-2px); }

.hero-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    width: 100%;
}
.benefit { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.benefit strong { font-size: 12px; color: white; white-space: nowrap; }
.benefit span { font-size: 10px; line-height: 1.4; color: #cbd7e8; }

.hero-slider { width: 100%; height: 460px; overflow: hidden; }
.hero-slider img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* =========================
   SHOP BY BRANDS
========================= */
.shoppingsection1 {
    padding: 70px 5%;
    background-color: #f5f7fa;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.shoppingsection1 h2 {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 38px;
    color: #102a43;
    margin-bottom: 20px;
}

.category-card {
    background-color: white;
    border: 2px solid #1769d1;
    border-radius: 15px;
    padding: 25px 20px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}
.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #ff6b00;
}

.category-icon {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.category-icon img { max-width: 130px; max-height: 110px; object-fit: contain; }

.category-card h3 { color: #1769d1; font-size: 22px; margin-bottom: 10px; }
.category-card p { color: #52667a; font-size: 14px; line-height: 1.6; flex-grow: 1; }

.category-card a {
    width: fit-content;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ff6b00;
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    transition: 0.3s;
}
.category-card a:hover { background-color: #1769d1; }

/* =========================
   PRODUCTS
========================= */
.top-deals {
    width: 100%;
    padding: 60px 30px 70px;
    background-color: #ffffff;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    scroll-margin-top: 90px; /* anchor links stop below the navbar */
}

.top-deals > h1 {
    grid-column: 1 / -1;
    margin: 0 0 15px;
    color: #123b75;
    font-size: 36px;
    font-weight: 700;
}

.boxes {
    background-color: #ffffff;
    border: 1px solid #e1e5eb;
    border-radius: 15px;
    padding: 25px 30px;
    min-height: 470px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: 0.3s ease;
}
.boxes:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10); }

.boxes img { width: 100%; height: 300px; object-fit: contain; margin-bottom: 20px; }
.boxes h3 { margin: 0 0 10px; color: #0d2f5f; font-size: 18px; font-weight: 700; }
.boxes h2 { margin: 0 0 20px; color: #1769d1; font-size: 28px; font-weight: 700; }

.deal-button {
    display: inline-block;
    width: fit-content;
    margin-top: 15px;
    padding: 12px 25px;
    background: #ff6b00;
    color: white;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: 0.3s;
}
.deal-button:hover { background: #123fa5; transform: translateY(-2px); }

.message-box { padding: 80px 5%; text-align: center; }

#brands { scroll-margin-top: 90px; }

/* =========================
   FOOTER (fallback - footer.css loads after and wins)
========================= */
.footer { background-color: #1746a2; color: white; }
.footer-content {
    max-width: 1100px;
    margin: auto;
    padding: 60px 5%;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 70px;
}
.footer-brand h3 { color: #ff6b00; font-size: 28px; margin-bottom: 20px; }
.footer-brand p { color: #dce6f5; line-height: 1.6; }
.footer-links h4, .footer-contact h4 { color: #ff6b00; font-size: 18px; margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: white; transition: 0.3s; }
.footer-links a:hover { color: #ff6b00; }
.footer-contact { display: flex; flex-direction: column; gap: 12px; }
.footer-contact p { color: #e1e9f5; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    padding: 20px;
    color: #dce6f5;
    font-size: 13px;
}

/* =========================================
   TABLET (max 1000px)
========================================= */
@media (max-width: 1000px) {
    .Hero { grid-template-columns: 1fr 1fr; }
    .hero-content h1 { font-size: 42px; }
    .shoppingsection1 { grid-template-columns: repeat(2, 1fr); }
    .shoppingsection1 h2 { font-size: 32px; }
    .top-deals { grid-template-columns: repeat(2, 1fr); padding: 50px 25px; }
    .top-deals > h1 { font-size: 32px; }
}

/* =========================================
   PHONES (max 760px) - navbar becomes ~115px tall
========================================= */
@media (max-width: 760px) {
    body { padding-top: 115px; }
    .top-deals, #brands { scroll-margin-top: 125px; }
}

/* =========================================
   MOBILE (max 700px)
========================================= */
@media (max-width: 700px) {

    /* HERO */
    .Hero {
        width: 92%;
        height: auto;
        min-height: 0;
        margin: 18px auto 0;
        border-radius: 18px;
        grid-template-columns: 1fr;
    }
    .hero-content { min-height: 0; padding: 32px 24px; border-radius: 18px 18px 0 0; }
    .hero-label { font-size: 11px; padding: 6px 13px; margin-bottom: 14px; }
    .hero-content h1 { font-size: clamp(28px, 7vw, 35px); line-height: 1.2; margin-bottom: 14px; }
    .hero-content p { font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
    .hero-buttons { width: 100%; }
    .hero-buttons a { display: block; width: 100%; text-align: center; padding: 13px 16px; font-size: 14px; }
    .hero-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
    .benefit { gap: 3px; }
    .benefit strong { font-size: 13px; white-space: normal; }
    .benefit span { font-size: 11.5px; }
    .hero-slider { width: 100%; height: 240px; border-radius: 0 0 18px 18px; }

    /* BRANDS */
    .shoppingsection1 {
        width: 92%;
        margin: 0 auto;
        padding: 45px 0 55px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    .shoppingsection1 h2 { grid-column: 1 / -1; font-size: 27px; margin-bottom: 8px; }
    .shoppingsection1 .category-card {
        min-width: 0;
        min-height: 0;
        padding: 12px;
        border-radius: 15px;
        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
    }
    .shoppingsection1 .category-card:hover { transform: none; }
    .category-icon {
        width: 100%;
        height: 120px;
        margin-bottom: 12px;
        padding: 5px;
        background: linear-gradient(135deg, #F8FAFC, #FFFFFF);
        border-radius: 12px;
    }
    .category-icon img { max-width: 100%; max-height: 105px; width: 100%; height: 100%; object-fit: contain; }
    .category-card h3 { font-size: 14px; line-height: 1.5; margin-bottom: 7px; overflow-wrap: anywhere; }
    .category-card p { font-size: 12px; line-height: 1.6; margin-bottom: 12px; }
    .category-card a { display: block; width: 100%; margin-top: auto; padding: 11px 5px; text-align: center; font-size: 12px; border-radius: 7px; }

    /* PRODUCTS */
    .top-deals { width: 100%; padding: 45px 4% 55px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .top-deals > h1 { grid-column: 1 / -1; font-size: 27px; text-align: center; margin-bottom: 12px; }
    .boxes {
        min-width: 0;
        min-height: 0;
        padding: 12px;
        border-radius: 14px;
        justify-content: space-between;
        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);
    }
    .boxes:hover { transform: none; }
    .boxes img { width: 100%; height: 145px; object-fit: contain; margin-bottom: 12px; }
    .boxes h3 { font-size: 13px; line-height: 1.5; margin-bottom: 8px; overflow-wrap: anywhere; }
    .boxes h2 { font-size: 17px; line-height: 1.4; margin-bottom: 12px; overflow-wrap: anywhere; }
    .boxes .deal-button { display: block; width: 100%; margin-top: auto; padding: 12px 5px; text-align: center; font-size: 12px; border-radius: 7px; }

    /* FOOTER */
    .footer-content { grid-template-columns: 1fr; gap: 40px; padding: 50px 8%; }

    .cart-message { left: 50%; right: auto; bottom: 20px; transform: translateX(-50%); max-width: 92%; text-align: center; }
}

/* =========================================
   VERY SMALL PHONES (max 380px)
========================================= */
@media (max-width: 380px) {
    .hero-content { padding: 28px 18px; }
    .hero-content h1 { font-size: 27px; }
    .hero-slider { height: 200px; }

    .shoppingsection1 { gap: 11px; }
    .shoppingsection1 h2 { font-size: 24px; }
    .shoppingsection1 .category-card { padding: 10px; }
    .category-icon { height: 105px; }
    .category-icon img { max-height: 95px; }
    .shoppingsection1 .category-card h3 { font-size: 13px; }
    .shoppingsection1 .category-card p { font-size: 11.5px; }

    .top-deals { gap: 11px; padding-left: 3%; padding-right: 3%; }
    .top-deals > h1 { font-size: 24px; }
    .boxes { padding: 10px; }
    .boxes img { height: 125px; }
    .boxes h3 { font-size: 12px; }
    .boxes h2 { font-size: 15px; }
    .boxes .deal-button { font-size: 11px; padding: 11px 4px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}