﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #155eef;
    --dark: #14213d;
    --light: #f5f7fb;
    --white: #ffffff;
    --muted: #697586;
    --border: #e5eaf2;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: var(--white);
    color: var(--dark);
    min-width: 280px;
    overflow-x: hidden;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.header {
    height: 75px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 8px;
}

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

.logo-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    overflow: hidden;
}

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

nav {
    display: flex;
    gap: 30px;
}

nav a {
    font-size: 14px;
    color: var(--muted);
}

nav a:hover {
    color: var(--primary);
}

.cart-button {
    order: 3;
    flex: 0 0 auto;
    min-height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
}

.cart-button span {
    background: white;
    color: var(--primary);
    padding: 3px 7px;
    border-radius: 20px;
    margin-left: 5px;
}

.hero {
    min-height: 460px;
    padding: 80px 8%;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(12, 25, 48, .94), rgba(12, 25, 48, .45)),
        url("https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=1600&q=85")
        center 55%/cover;
    color: white;
}

.hero-content {
    max-width: 650px;
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.hero .eyebrow {
    color: #b9d0ff;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.12;
    margin: 18px 0;
}

.hero p {
    color: #e2e8f0;
    line-height: 1.8;
    max-width: 540px;
    margin-bottom: 28px;
}

.primary-button {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 22px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
}

.primary-button:hover {
    background: #104bc4;
}

.container {
    padding: 75px 7%;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading h2 {
    font-size: 32px;
    margin: 10px 0;
}

.section-heading p {
    color: var(--muted);
}

.shop-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.shop-controls input,
.shop-controls select {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: white;
}

.shop-controls input {
    flex: 1;
}

.shop-controls input:focus,
.shop-controls select:focus {
    border-color: var(--primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.product-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: .2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.product-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    background: var(--light);
}

.product-info {
    padding: 16px;
}

.product-category {
    color: var(--primary);
    font-size: 12px;
    font-weight: bold;
}

.product-info h3 {
    font-size: 16px;
    margin: 10px 0;
}

.product-description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    min-height: 38px;
}

.product-price {
    font-size: 19px;
    font-weight: bold;
    margin: 15px 0;
}

.add-button {
    width: 100%;
    padding: 12px;
    background: var(--dark);
    color: white;
    border: none;
    border-radius: 7px;
}

.add-button:hover {
    background: var(--primary);
}

.loading {
    color: var(--muted);
    padding: 25px;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 30;
    display: none;
}

.overlay.active {
    display: block;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: min(420px, 100%);
    height: 100vh;
    background: white;
    z-index: 40;
    display: flex;
    flex-direction: column;
    transition: .3s;
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    padding: 22px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.close-button {
    border: none;
    background: none;
    font-size: 30px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.cart-item img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    margin-bottom: 7px;
}

.cart-item-details p {
    color: var(--primary);
    font-weight: bold;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
}

.quantity-controls button {
    width: 25px;
    height: 25px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 5px;
}

.remove-button {
    color: #dc2626;
    border: none;
    background: none;
    margin-top: 8px;
    font-size: 12px;
}

.cart-footer {
    padding: 22px;
    border-top: 1px solid var(--border);
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    margin-bottom: 20px;
}

.full-button {
    width: 100%;
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: white;
    padding: 13px 22px;
    border-radius: 8px;
    z-index: 60;
    transition: .3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.footer {
    background: var(--dark);
    color: white;
    padding: 45px 7%;
    text-align: center;
}

.footer p {
    color: #cbd5e1;
    margin-top: 12px;
    font-size: 13px;
}

.menu-button {
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--dark);
    transition: transform .2s, opacity .2s;
}

.menu-button.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-button.open span:nth-child(2) {
    opacity: 0;
}

.menu-button.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Fluid layout helpers */
img,
video {
    max-width: 100%;
}

.header,
.container,
.hero,
.footer {
    width: 100%;
}

.product-card,
.product-info,
.cart-drawer,
.cart-item-details {
    min-width: 0;
}

button,
input,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1200px) {
    .header {
        padding-inline: 4%;
    }

    .container {
        padding-inline: 4%;
    }

    .hero {
        padding-inline: 6%;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .header {
        height: 68px;
    }

    nav {
        gap: 16px;
    }

    .logo {
        font-size: 20px;
    }

    .hero {
        min-height: 420px;
    }

    .product-grid {
        gap: 16px;
    }

    .product-image {
        height: clamp(150px, 23vw, 210px);
    }
}

@media (max-width: 700px) {
    .header {
        height: 64px;
        padding-inline: 16px;
        gap: 8px;
    }

    .header .logo {
        min-width: 0;
        margin-right: auto;
    }

    .menu-button {
        display: flex;
        order: 2;
        flex: 0 0 44px;
    }

    .logo {
        gap: 8px;
        font-size: 16px;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        padding: 12px 16px;
        gap: 4px;
        flex-direction: column;
        background: white;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(20, 33, 61, .08);
    }

    nav.open {
        display: flex;
    }

    nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0 12px;
        border-radius: 8px;
        color: var(--dark);
        font-size: 15px;
    }

    nav a:hover {
        background: var(--light);
    }

    .cart-button {
        min-height: 44px;
        padding: 10px 12px;
        white-space: nowrap;
    }

    .hero {
        min-height: min(520px, calc(100svh - 64px));
        padding: 56px 20px;
        background-position: 62% center;
    }

    .hero h1 {
        font-size: clamp(34px, 11vw, 48px);
    }

    .hero p {
        font-size: 15px;
        line-height: 1.65;
    }

    .container {
        padding: 44px 16px;
    }

    .section-heading h2 {
        font-size: clamp(26px, 8vw, 32px);
    }

    .shop-controls {
        flex-direction: column;
        gap: 10px;
    }

    .shop-controls input,
    .shop-controls select {
        width: 100%;
        min-height: 46px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .product-image {
        height: clamp(120px, 34vw, 180px);
    }

    .product-info {
        padding: 11px;
    }

    .product-info h3 {
        font-size: 15px;
        line-height: 1.25;
    }

    .product-description {
        min-height: 0;
        font-size: 12px;
    }

    .product-price {
        font-size: 17px;
        margin: 12px 0;
    }

    .add-button {
        min-height: 44px;
    }

    .cart-drawer {
        right: -100%;
        width: 100%;
        max-width: 420px;
    }

    .cart-header,
    .cart-items,
    .cart-footer {
        padding-inline: 16px;
    }

    .cart-header {
        min-height: 64px;
        align-items: center;
    }

    .cart-header h2 {
        font-size: 20px;
    }

    .close-button {
        width: 44px;
        height: 44px;
    }

    .toast {
        width: calc(100% - 32px);
        text-align: center;
    }

    .footer {
        padding: 38px 16px;
    }
}

@media (max-width: 480px) {
    .header .logo {
        max-width: calc(100% - 86px);
        font-size: 14px;
    }

    .hero {
        min-height: 440px;
        align-items: flex-end;
        padding-bottom: 44px;
    }

    .hero-content {
        width: 100%;
    }

    .primary-button {
        min-height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .product-image {
        height: clamp(190px, 58vw, 280px);
    }

    .product-info {
        padding: 16px;
    }

    .product-info h3 {
        font-size: 17px;
    }

    .product-description {
        font-size: 13px;
    }

    .cart-item img {
        width: 68px;
        height: 68px;
    }

    .quantity-controls button {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 340px) {
    .header {
        padding-inline: 10px;
    }

    .header .logo {
        font-size: 12px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .cart-button {
        font-size: 13px;
        padding-inline: 9px;
    }

    .hero {
        padding-inline: 16px;
    }

    .hero h1 {
        font-size: 32px;
    }
}

@media (min-width: 1500px) {
    .header,
    .container,
    .hero,
    .footer {
        padding-inline: max(7%, calc((100% - 1380px) / 2));
    }

    .product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* ================================
   RESPONSIVE MOBILE NAVIGATION
================================ */

/* Desktop */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.menu-button {
    display: none;
}

/* Tablets and mobile phones */
@media (max-width: 700px) {

    .header {
        height: 64px;
        padding: 0 14px;
        gap: 8px;
        position: sticky;
    }

    .header .logo {
        flex: 1;
        min-width: 0;
        max-width: none;
        margin-right: 0;
        gap: 7px;
        font-size: 15px;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    .logo-name {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* Hamburger button */
    .menu-button {
        display: flex;
        order: 2;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        border: 1px solid var(--border);
        background: white;
        border-radius: 8px;
        cursor: pointer;
    }

    .menu-button span {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--dark);
        border-radius: 2px;
        transition: .25s;
    }

    /* Animate hamburger into X */
    .menu-button.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-button.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-button.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Mobile navigation dropdown */
    .header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        background: white;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 25px rgba(0, 0, 0, .10);
        z-index: 101;
    }

    .header nav.open {
        display: flex;
    }

    .header nav a {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: 0 14px;
        color: var(--dark);
        font-size: 15px;
        border-radius: 7px;
    }

    .header nav a:hover {
        background: var(--light);
        color: var(--primary);
    }

    /* Cart button */
    .cart-button {
        order: 3;
        flex: 0 0 auto;
        min-height: 42px;
        padding: 9px 11px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* Very small phones */
@media (max-width: 360px) {

    .header {
        padding: 0 8px;
        gap: 5px;
    }

    .header .logo {
        font-size: 12px;
        gap: 5px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .menu-button {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .cart-button {
        padding: 8px;
        font-size: 12px;
    }
}


/* =====================================
   RESPONSIVE SHOPPING CART
===================================== */

/* Cart overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;

    width: min(420px, 100%);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;

    background: white;
    z-index: 1000;

    display: flex;
    flex-direction: column;

    transform: translateX(100%);
    transition: transform 0.3s ease;

    overflow: hidden;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.12);
}

.cart-drawer.active {
    right: 0;
    transform: translateX(0);
}

/* Cart header */
.cart-header {
    flex: 0 0 auto;
    min-height: 75px;
    padding: 15px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);
}

.cart-header h2 {
    font-size: 21px;
    line-height: 1.3;
}

/* Close button */
.close-button {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 8px;
    background: var(--light);

    font-size: 30px;
    color: var(--dark);
    flex-shrink: 0;
}

.close-button:hover {
    background: var(--border);
}

/* Scrollable cart items */
.cart-items {
    flex: 1 1 auto;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 20px;

    -webkit-overflow-scrolling: touch;
}

/* Individual cart item */
.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    width: 100%;
    min-width: 0;

    margin-bottom: 18px;
    padding-bottom: 15px;

    border-bottom: 1px solid var(--border);
}

.cart-item img {
    width: 75px;
    height: 75px;
    flex: 0 0 75px;

    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.cart-item-details h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 7px;
}

.cart-item-details p {
    font-size: 14px;
}

/* Quantity buttons */
.quantity-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.quantity-controls button {
    width: 34px;
    height: 34px;
    flex-shrink: 0;

    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;

    font-size: 16px;
}

/* Remove item */
.remove-button {
    display: inline-block;
    padding: 5px 0;
    font-size: 13px;
}

/* Cart footer */
.cart-footer {
    flex: 0 0 auto;

    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));

    background: white;
    border-top: 1px solid var(--border);
}

/* Total */
.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;

    font-size: 19px;
    margin-bottom: 18px;
}

.total-row strong {
    overflow-wrap: anywhere;
    text-align: right;
}

/* Checkout button */
.cart-footer .full-button {
    width: 100%;
    min-height: 50px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 14px;
}

/* =====================================
   MOBILE CART
===================================== */

@media (max-width: 600px) {

    .cart-drawer {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
    }

    .cart-header {
        min-height: 65px;
        padding: 10px 16px;
    }

    .cart-header h2 {
        font-size: 19px;
    }

    .cart-items {
        padding: 16px;
    }

    .cart-item {
        gap: 10px;
    }

    .cart-item img {
        width: 68px;
        height: 68px;
        flex-basis: 68px;
    }

    .cart-item-details h4 {
        font-size: 14px;
    }

    .cart-footer {
        padding: 16px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .total-row {
        font-size: 18px;
    }

    .cart-footer .full-button {
        min-height: 50px;
    }
}

/* Very small phones */
@media (max-width: 360px) {

    .cart-header h2 {
        font-size: 17px;
    }

    .cart-items {
        padding: 12px;
    }

    .cart-item img {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .cart-item-details h4 {
        font-size: 13px;
    }

    .cart-footer {
        padding: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .total-row {
        font-size: 16px;
    }
}

.contact-section {
    padding: 60px 20px;
    background: #f5f5f5;
    text-align: center;
}

.contact-container {
    max-width: 850px;
    margin: auto;
}

.contact-container h2 {
    font-size: 30px;
    margin-bottom: 12px;
    color: #14213d;
}

.contact-container p {
    margin-bottom: 25px;
    color: #666;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    padding: 18px 25px;
    border-radius: 9px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
}

.contact-btn:hover {
    transform: translateY(-3px);
}

.whatsapp-btn {
    background: #159b54;
}

.call-btn {
    background: #183b70;
}

@media(max-width: 500px) {
    .contact-buttons {
        flex-direction: column;
    }

    .contact-btn {
        box-sizing: border-box;
        width: 100%;
    }
}
