@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1976d2;
    --accent: #ff9800;
    --background: #fff;
    --surface: #f5f5f5;
    --text: #222;
    --text-light: #555;
    --gold: #ffd700;
    --radius: 1.1rem;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 14px 40px rgba(15, 23, 42, 0.14);
}

html, body {
    height: 100%;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-size: 1.08rem;
    line-height: 1.7;
}
.container[role='main'], main[role='main'] {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.7em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

.card {
    border-radius: var(--radius);
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: var(--background);
    box-shadow: var(--shadow-sm);
    padding: 2.2rem 1.5rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.25);
}
.card-title {
    color: #222;
    font-weight: 400;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.card-price {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}
.card-desc {
    color: #222;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.7rem;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hero */
.hero {
    border-radius: var(--radius);
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: linear-gradient(180deg, rgba(37,99,235,0.06), rgba(255,255,255,1));
    box-shadow: var(--shadow-sm);
    padding: 1.2rem 1.2rem;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    align-items: center;
}
.hero-kicker {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(25, 118, 210, 0.9);
    margin-bottom: 0.25rem;
}
.hero-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.hero-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}
@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
    .hero-tags {
        justify-content: flex-start;
    }
    .hero-title {
        font-size: 1.6rem;
    }
}

.btn, button {
    border-radius: 0.6rem !important;
    font-size: 1.08rem;
    font-weight: 600;
    padding: 0.7rem 1.7rem;
    border: none;
    transition: background 0.2s, color 0.2s, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:active, button:active {
    transform: translateY(1px);
}
.btn-primary, .btn-primary:active, .btn-primary:focus {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}
.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-accent:hover {
    background: #ffb74d;
    border-color: #ffb74d;
    color: #fff;
}

.btn-outline-secondary {
    border: 1px solid rgba(15, 23, 42, 0.18) !important;
}

.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}

input, select, textarea {
    border-radius: 0.5rem !important;
    border: 1.5px solid #bbb;
    font-size: 1.08rem;
    padding: 0.7rem 1rem;
    background: #fff;
    color: var(--text);
    margin-bottom: 1rem;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
}

a, .nav-link {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover, .nav-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.navbar {
    background: var(--background) !important;
    border-bottom: 2px solid var(--surface);
    font-size: 1.08rem;
}
.navbar-brand span {
    color: var(--primary-dark);
    letter-spacing: 2px;
    font-weight: 700;
}

/* Brand logos */
.site-logo {
    height: 84px;
    width: auto;
    margin-right: 10px;
}
.footer-logo {
    height: 44px;
    width: auto;
}

/* Mobile category scroll */
.category-scroll {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}
.category-scroll::-webkit-scrollbar { height: 6px; }
.category-scroll::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.14); border-radius: 99px; }
.category-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.10);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}
.category-pill:hover {
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--primary-dark);
    text-decoration: none;
}

footer {
    background: var(--surface);
    color: var(--text-light);
    border-top: 2px solid var(--primary);
    font-size: 0.92rem;
    padding: 0.6rem 0 0.4rem 0;
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
}
footer a {
    color: var(--primary-dark);
}
footer a:hover {
    color: var(--accent);
}
footer p {
    margin-bottom: 0.75rem;
}
footer .row {
    align-items: flex-start;
}
.footer .row {
    flex-wrap: wrap;
}
.footer .col-12,
.footer .col-6,
.footer .col-md-2,
.footer .col-md-3,
.footer .col-md-4 {
    min-width: 0;
}
.footer-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    align-items: start;
}
.footer-col {
    min-width: 0;
}
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
}
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
.footer-desc {
    max-width: 44ch;
    line-height: 1.5;
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Footer link spacing (prevents overlap) */
.footer-links li {
    margin: 0.3rem 0;
    line-height: 1.25;
}
.footer-links a {
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Social icons */
.social-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary-dark);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.social-icon:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(37, 99, 235, 0.35);
    background: #fff;
    text-decoration: none;
}
.social-icon svg {
    display: block;
}
.social-icon--instagram { color: #E1306C; border-color: rgba(225, 48, 108, 0.35); }
.social-icon--facebook { color: #1877F2; border-color: rgba(24, 119, 242, 0.35); }
.social-icon--whatsapp { color: #25D366; border-color: rgba(37, 211, 102, 0.35); }
.social-icon--instagram:hover { border-color: rgba(225, 48, 108, 0.55); }
.social-icon--facebook:hover { border-color: rgba(24, 119, 242, 0.55); }
.social-icon--whatsapp:hover { border-color: rgba(37, 211, 102, 0.55); }

.product-grid {
    display: grid;
    /* auto-fill keeps empty tracks so a single card doesn't stretch full width */
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 2.2rem;
}

/* PDP thumbnails */
.pdp-thumb {
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: #fff;
    border-radius: 12px;
    padding: 0;
    width: 56px;
    height: 56px;
    overflow: hidden;
}
.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pdp-thumb:hover {
    border-color: rgba(37, 99, 235, 0.35);
}

/* Checkout two-column layout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.2rem;
    align-items: start;
}
.checkout-right {
    position: sticky;
    top: 16px;
    align-self: start;
}
@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    .checkout-right {
        position: static;
    }
}

/* Image viewer (zoom/lightbox) */
.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 1100;
}
.image-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}
.image-viewer__panel {
    position: relative;
    z-index: 1;
    margin: 24px auto;
    max-width: min(1100px, 96vw);
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.image-viewer__topbar {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.95);
}
.image-viewer__stage {
    height: min(72vh, 720px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.02);
    touch-action: none;
}
.image-viewer__img {
    max-width: 95%;
    max-height: 95%;
    transform-origin: center center;
    user-select: none;
    will-change: transform;
}

/* Toast notifications (Bootstrap) */
.toast-container {
    z-index: 1080;
}
.toast {
    border-radius: 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: var(--shadow-md);
}

/* Empty state helpers */
.empty-state {
    padding: 3rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px dashed rgba(15, 23, 42, 0.18);
}

/* Loading spinner wrapper */
.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1200px) {
    .product-grid { gap: 1.2rem; }
    .card { padding: 1.5rem 0.7rem; }
}
@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    .navbar-brand img { height: 40px; }
    .navbar-brand .site-logo { height: 64px; }
    .navbar-brand span { font-size: 1.05rem !important; }
    .product-grid { gap: 0.7rem; }
    .card { border-radius: 0.7rem; padding: 1.1rem 0.5rem; }
    .btn, button { font-size: 1rem; padding: 0.6rem 1.1rem; }
    input, select, textarea { font-size: 1rem; padding: 0.6rem 0.7rem; }
}

.gold { color: var(--gold); }
img { max-width: 100%; height: auto; }

/* Image layout stability */
.media-square {
    aspect-ratio: 1 / 1;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-square img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Product card carousel (multiple images) */
.card-carousel {
    position: relative;
}
.card-carousel .carousel-inner {
    border-radius: 14px;
}
.card-carousel .carousel-control-prev,
.card-carousel .carousel-control-next {
    width: 42px;
    opacity: 0.0;
    transition: opacity 0.15s ease;
}
.card-carousel:hover .carousel-control-prev,
.card-carousel:hover .carousel-control-next {
    opacity: 0.95;
}
.card-carousel .carousel-control-prev-icon,
.card-carousel .carousel-control-next-icon {
    filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.25));
    background-color: rgba(255,255,255,0.92);
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background-size: 60% 60%;
}
@media (max-width: 768px) {
    .card-carousel .carousel-control-prev,
    .card-carousel .carousel-control-next {
        opacity: 0.9;
    }
}

/* PDP actions layout */
.pdp-actions {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
}
.pdp-actions__primary {
    flex: 1 1 240px;
    margin: 0;
}
@media (max-width: 768px) {
    .pdp-actions {
        flex-direction: column;
    }
    .pdp-actions > a,
    .pdp-actions__primary {
        width: 100%;
    }
}