/* Ocho Ochenta - Premium Western Design System */

:root {
    /* Colors */
    --color-bg-light: #f9f5f0;
    --color-bg-dark: #2c1810;
    --color-primary: #5d2e17;
    /* Leather Brown */
    --color-accent: #c5a059;
    /* Brass/Gold */
    --color-text: #2c1810;
    --color-text-muted: #6b4f3b;
    --color-white: #ffffff;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    position: relative;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.brand-font {
    font-family: var(--font-heading);
    font-weight: 700;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Base Responsive Grid */
.grid {
    display: grid;
    gap: var(--spacing-sm);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.text-center {
    text-align: center;
}

.d-block {
    display: block;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .container {
        padding: 0 var(--spacing-md);
    }
}

/* Animations */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.animate.show {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Header & Nav */
.main-header {
    background: var(--color-white);
    position: relative;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.logo img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.main-header.home-header {
    background: transparent;
    position: absolute;
    box-shadow: none;
}

.top-bar {
    background: transparent;
    /* No background to show splash */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    width: 100%;
}

.top-bar-content {
    display: flex;
    justify-content: center;
    gap: 3rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #8a6d5a;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    width: 100%;
}

.top-bar-content span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: normal;
    /* Ensure text can wrap */
    text-align: center;
}

/* Mobile Nav & Header - Consolidated at the end of file */

/* Branding Area removed in favor of Splash Logo */

/* Nav Centered Definition */
.nav-centered {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
    list-style: none;
    gap: 3rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    color: var(--color-primary);
}

/* Hero Section */
/* Hero Dynamic Layout */
.hero-dynamic {
    position: relative;
    padding: 0;
    min-height: 90vh;
    /* Premium height */
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: top center;
    /* Align to top to show horse/logo */
    background-repeat: no-repeat;
    background-color: #000;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
    z-index: 1;
}

.hero-dynamic .container {
    position: relative;
    z-index: 2;
    padding: 360px 8% 80px;
    /* Pushed into white space */
    text-align: left;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Desktop left alignment */
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

/* hero-logo removed */

.hero-text-content {
    max-width: 700px;
    margin: 0;
    /* Align left */
}

.hero-text-content h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    /* More balanced size */
    line-height: 1.1;
    margin-bottom: 0.8rem;
    color: var(--color-primary);
}

.hero-text-content p {
    font-size: clamp(0.9rem, 1.8vw, 1.15rem);
    margin-bottom: 2rem;
    color: var(--color-text-muted);
}

/* Mobile Hero - Handled at the end of file for consolidation */

/* Duplicate nav-centered removed */

.nav-links a {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #452110;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.75rem;
}

/* Cart Elements */
.cart-floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cart-floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background: var(--color-accent);
}

.cart-floating-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid white;
}

.cart-toast {
    position: fixed;
    bottom: 100px;
    right: 2rem;
    background: #2f3542;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2000;
}

.cart-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--spacing-lg) 0 var(--spacing-md);
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header .section-title {
    margin: 0;
    flex: 1;
}

.view-all-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    padding-bottom: 4px;
}

.view-all-link:hover {
    color: var(--color-primary);
    border-color: var(--color-accent);
    transform: translateX(5px);
}

.section-title {
    text-align: center;
    margin: var(--spacing-lg) 0 var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1.6rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.section-title span {
    position: relative;
    padding: 0 1.5rem;
}

.section-title span::before,
.section-title span::after {
    content: "❧";
    /* Decorative western-style flourish */
    color: var(--color-accent);
    font-size: 1.2rem;
    margin: 0 10px;
}

.section-title::before,
.section-title::after {
    content: "";
    height: 1.5px;
    background: var(--color-accent);
    flex: 1;
    max-width: 150px;
}

.brands-grid {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 2rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE/Edge */
}

.brands-grid::-webkit-scrollbar {
    display: block;
    height: 3px;
}

.brands-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.brands-grid::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 10px;
}

.brand-item {
    flex: 0 0 75%;
    /* Shows 1 item and peeks the second clearly */
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    margin: 0 0.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .brands-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
        gap: 3rem;
    }

    .brand-item {
        flex: none;
        background: transparent;
        box-shadow: none;
    }
}

.brand-item:hover {
    transform: scale(1.05);
}

.brand-item img {
    max-height: 100px;
    width: auto;
    object-fit: contain;
    filter: none;
    opacity: 1;
}

/* Cards */
.category-card,
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    /* Allow content to push button down */
    height: 100%;
    /* Ensure all cards in a row have same height */
}

.category-card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-content {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content .btn {
    margin-top: auto;
}

.card-actions {
    display: flex;
    flex-direction: column;
    /* Stack buttons vertically */
    gap: 0.5rem;
    width: 100%;
}

.card-actions .btn {
    width: 100%;
    /* Full width */
    padding: 0.6rem 0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.stars {
    color: var(--color-accent);
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.img-wrapper,
.img-container {
    overflow: hidden;
    background: #f0f0f0;
}

.category-card .img-wrapper,
.product-card .img-container {
    height: 320px;
    /* Standardize height for both */
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    padding: 10px;
    /* Breathing room */
    transition: transform 0.6s ease;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    /* Show full product */
    padding: 10px;
    /* Breathing room */
    transition: transform 0.6s ease;
}

.category-card:hover img,
.product-card:hover img {
    transform: scale(1.1);
}

.category-card h3,
.product-card h4 {
    padding: 1rem;
    text-align: center;
}

.product-card {
    padding: 1rem;
}

.product-card .price {
    display: block;
    text-align: center;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0.5rem 0 1rem;
    font-size: 1.1rem;
}

.product-card .price small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

/* Status Badge */
.status-badge,
.badge {
    padding: 4px 12px;
    border-radius: 2px;
    /* Square premium look */
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.badge-best {
    background: #6b4f3b;
    color: white;
}

.badge-offer {
    background: #5d2e17;
    color: white;
}

.status-available {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-unavailable {
    background: #ffebee;
    color: #c62828;
}

/* 
   ==========================================================================
   Final Mobile Consolidation (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {

    /* Global Containment */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative;
    }

    .container {
        padding: 0 1rem !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Header & Nav */
    .main-header {
        position: relative !important;
        background: white !important;
        width: 100% !important;
        top: 0 !important;
        z-index: 1001 !important;
    }

    .top-bar {
        background: #fdfaf7 !important;
        padding: 5px 0 !important;
        width: 100% !important;
    }

    .top-bar-content {
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 5px 1rem !important;
        text-align: center !important;
    }

    .nav-centered,
    .hero-overlay {
        display: none !important;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    /* Hero Section - FOCUS ON LOGO (Centered) */
    .hero-dynamic {
        background-image: none !important;
        /* Disable background on mobile */
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        /* Start from top */
        background-color: white !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* Show the image element */
    #mobile-hero-img {
        display: block !important;
    }

    .hero-dynamic .container {
        padding: 2rem 1rem 3rem !important;
        width: 100% !important;
        text-align: center !important;
        background: white !important;
        /* Solid white background */
        margin-top: -5px;
        /* Tiny overlap to prevent white line gaps if any */
    }

    .hero-content {
        width: 100% !important;
        align-items: center !important;
    }

    .hero-text-content {
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-text-content h1 {
        font-size: 1.4rem !important;
        word-break: break-word !important;
        margin-bottom: -0.5rem !important;
    }

    .hero-text-content p {
        font-size: 0.9rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* Grid Layouts */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .grid-2,
    .grid-4,
    .grid-3 {
        grid-template-columns: 1fr !important;
    }
}

/* Floating WhatsApp Button */
.whatsapp-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.whatsapp-text {
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a4a4a;
    position: relative;
    max-width: 200px;
    animation: floatText 3s ease-in-out infinite;
    text-decoration: none;
    display: block;
    border: 1px solid #eee;
}

.whatsapp-text::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
}

@keyframes floatText {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.whatsapp-float {
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
    /* Removed fixed positioning as container handles it now */
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #128c7e;
}

.whatsapp-float svg {
    width: 38px;
    height: 38px;
    fill: white;
}

@media (max-width: 768px) {
    .whatsapp-container {
        bottom: 1.5rem;
        left: 1rem;
    }

    .whatsapp-float {
        width: 55px;
        height: 55px;
    }

    .whatsapp-float svg {
        width: 32px;
        height: 32px;
    }

    .whatsapp-text {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}