/* =====================================================
   BEEF MANIAC - GLOBAL STYLES
   Mobile-First Responsive Design
   Breakpoints: Mobile < 768px | Tablet 768-1199px | Desktop 1200px+
   ===================================================== */

/* CSS Custom Properties (Variables) */
:root {
    /* Colors */
    --color-primary: #dc2626;
    --color-primary-dark: #b91c1c;
    --color-primary-light: #ef4444;
    --color-secondary: #1a1a1a;
    --color-secondary-light: #333333;
    --color-accent: #f4a460;
    --color-white: #ffffff;
    --color-off-white: #f8f8f8;
    --color-gray-lighter: #f5f5f5;
    --color-gray-light: #e5e5e5;
    --color-gray: #888888;
    --color-gray-dark: #555555;
    --color-black: #000000;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-error: #dc3545;

    /* Typography */
    --font-heading: 'Passion One', cursive;
    --font-body: 'Nunito', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 4rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-toast: 600;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-secondary);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 var(--spacing-2xl);
    }
}

/* Section Spacing */
.section {
    padding: var(--spacing-2xl) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--spacing-3xl) 0;
    }
}

@media (min-width: 1200px) {
    .section {
        padding: var(--spacing-4xl) 0;
    }
}

/* Section Title */
.section-title {
    font-size: var(--font-size-3xl);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--color-secondary);
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--font-size-4xl);
        margin-bottom: var(--spacing-xl);
    }
}

/* =====================================================
   HEADER & NAVIGATION
   ===================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background-color: var(--color-secondary);
    transition: background-color var(--transition-base);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    z-index: var(--z-fixed);
}

.logo-img {
    height: 75px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

@media (min-width: 768px) {
    .logo-img {
        height: 100px;
        max-width: 320px;
    }
}

@media (min-width: 1200px) {
    .logo-img {
        height: 120px;
        max-width: 400px;
    }
}

/* Desktop Navigation */
.nav-menu {
    display: none;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

@media (min-width: 1200px) {
    .nav-menu {
        gap: var(--spacing-xl);
    }
}

.nav-menu a {
    color: var(--color-white);
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--spacing-sm) 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Cart Icon */
.cart-icon {
    position: relative;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
}

.cart-icon svg {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-xs);
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hamburger Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--spacing-sm);
    z-index: var(--z-fixed);
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--color-white);
    transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--color-secondary);
    padding: 80px var(--spacing-xl) var(--spacing-xl);
    transition: right var(--transition-base);
    z-index: var(--z-modal);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.mobile-menu a {
    color: var(--color-white);
    font-size: var(--font-size-lg);
    font-weight: 600;
    display: block;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-secondary-light);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: var(--z-modal-backdrop);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 44px; /* Touch-friendly */
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

/* Bright red CTA buttons for important actions */
.btn-cta {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-cta:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-light);
    color: var(--color-white);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
}

.btn-outline:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-outline-white:hover {
    background-color: var(--color-white);
    color: var(--color-secondary);
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
}

.btn-small {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-xs);
    min-height: 36px;
}

.btn-block {
    width: 100%;
}

/* Payment Buttons Placeholder */
.payment-buttons-placeholder {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.btn-apple-pay,
.btn-google-pay {
    flex: 1;
    padding: var(--spacing-sm);
    font-size: var(--font-size-xs);
    background-color: var(--color-gray-light);
    color: var(--color-gray);
    border-radius: var(--radius-sm);
    min-height: 36px;
}

/* =====================================================
   BADGES
   ===================================================== */
.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
}

.badge-hero {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.badge-starter {
    background-color: var(--color-accent);
    color: var(--color-secondary);
}

.badge-favorite {
    background-color: #ff6b6b;
    color: var(--color-white);
}

.badge-value {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.badge-bulk {
    background-color: #6c5ce7;
    color: var(--color-white);
}

.badge-shipping {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.badge-coming-soon {
    background-color: var(--color-gray);
    color: var(--color-white);
}

.halal-badge {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: 700;
    border-radius: var(--radius-md);
    letter-spacing: 0.05em;
}

.halal-badge-inline {
    display: block;
    text-align: center;
    color: var(--color-primary);
    font-weight: 700;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-lg);
}

/* =====================================================
   FORMS
   ===================================================== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--color-secondary);
}

.form-label.required::after {
    content: ' *';
    color: var(--color-error);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    border: 2px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    background-color: var(--color-white);
    transition: border-color var(--transition-fast);
    min-height: 44px;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: var(--color-error);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
}

/* CAPTCHA Placeholder */
.captcha-placeholder {
    padding: var(--spacing-md);
    background-color: var(--color-gray-light);
    border: 2px dashed var(--color-gray);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--color-gray);
    font-size: var(--font-size-sm);
    margin: var(--spacing-md) 0;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--spacing-md);
}

.modal-content {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 32px;
    height: 32px;
    font-size: var(--font-size-2xl);
    color: var(--color-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.modal-close:hover {
    color: var(--color-secondary);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.footer-brand .logo-img {
    height: 80px;
    max-width: 280px;
    margin-bottom: var(--spacing-md);
    object-fit: contain;
}

@media (min-width: 768px) {
    .footer-brand .logo-img {
        height: 100px;
        max-width: 350px;
    }
}

.footer-brand p {
    color: var(--color-gray);
    font-size: var(--font-size-sm);
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--color-white);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a {
    color: var(--color-gray);
    font-size: var(--font-size-sm);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-contact p {
    color: var(--color-gray);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.footer-social a {
    color: var(--color-gray);
    font-size: var(--font-size-sm);
}

.footer-social a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--color-secondary-light);
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-bottom p {
    color: var(--color-gray);
    font-size: var(--font-size-sm);
}

/* =====================================================
   PLACEHOLDER IMAGES
   ===================================================== */
.placeholder-image {
    background-color: var(--color-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray);
    font-size: var(--font-size-sm);
    text-align: center;
    min-height: 150px;
    border-radius: var(--radius-md);
}

.placeholder-image.large {
    min-height: 300px;
}

@media (min-width: 768px) {
    .placeholder-image.large {
        min-height: 400px;
    }
}

.placeholder-image.small {
    min-height: 80px;
}

.placeholder-image.icon {
    min-height: 80px;
    width: 80px;
    border-radius: var(--radius-full);
    margin: 0 auto;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Hide on mobile */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Main content offset for fixed header */
main {
    padding-top: 70px;
}

@media (min-width: 768px) {
    main {
        padding-top: 80px;
    }
}

/* =====================================================
   ADDITIONAL MOBILE OPTIMIZATIONS
   ===================================================== */

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Better touch targets for all interactive elements */
@media (max-width: 767px) {
    a, button, input, select, textarea {
        min-height: 44px;
    }

    /* Improve tap targets */
    .btn {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    /* Better spacing for forms on mobile */
    .form-group {
        margin-bottom: var(--spacing-lg);
    }
}

/* Ensure images never overflow container */
img, video, iframe {
    max-width: 100%;
}

/* Fix for iOS form zoom */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px;
    }
}

/* Header scrolled state */
.header.scrolled {
    background-color: rgba(26, 26, 26, 0.98);
    box-shadow: var(--shadow-md);
}

/* Improve mobile menu overlay */
@media (max-width: 767px) {
    .mobile-menu {
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }
}

/* Better text sizing for readability */
@media (max-width: 767px) {
    body {
        font-size: var(--font-size-base);
        line-height: 1.7;
    }

    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }
}
