/**
 * Main Stylesheet
 * Bakr & Khattab E-Commerce
 * 
 * @author Rizki Maulana
 * @year 2026
 * @description Complete styling matching exact design specifications with Neue Montreal font
 */

/* ============================================================
   Font Face - Neue Montreal (Local)
   Place your font files in assets/fonts/ directory
   ============================================================ */
@font-face {
    font-family: 'Neue Montreal';
    src: url('../fonts/NeueMontreal-Light.woff2') format('woff2'),
         url('../fonts/NeueMontreal-Light.woff') format('woff'),
         url('../fonts/NeueMontreal-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../fonts/NeueMontreal-Regular.woff2') format('woff2'),
         url('../fonts/NeueMontreal-Regular.woff') format('woff'),
         url('../fonts/NeueMontreal-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../fonts/NeueMontreal-Medium.woff2') format('woff2'),
         url('../fonts/NeueMontreal-Medium.woff') format('woff'),
         url('../fonts/NeueMontreal-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Montreal';
    src: url('../fonts/NeueMontreal-Bold.woff2') format('woff2'),
         url('../fonts/NeueMontreal-Bold.woff') format('woff'),
         url('../fonts/NeueMontreal-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
    /* Brand Colors */
    --color-burgundy: #541622;
    --color-olive: #59663D;
    --color-navy: #143552;
    --color-brown: #4F3D25;
    --color-cream: #DBD4C6;
    
    /* Extended Palette */
    --color-white: #FFFFFF;
    --color-black: #1A1A1A;
    --color-gray: #9A9A9A;
    --color-gray-dark: #5A5A5A;
    
    /* Typography */
    --font-primary: 'Neue Montreal', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-arabic: 'Amiri', 'Traditional Arabic', serif;
    
    /* Layout */
    --container-max: 1440px;
    --header-height: 60px;
    --announcement-height: 32px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-cream);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

a:hover {
    opacity: 0.7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   Announcement Bar
   ============================================================ */
.announcement-bar {
    background-color: var(--color-navy);
    color: var(--color-white);
    text-align: center;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.1em;
    overflow: hidden;
    position: relative;
}

.announcement-bar-content {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 5s linear infinite;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.announcement-bar:hover .announcement-bar-content {
    animation-play-state: paused;
}

.announcement-bar .highlight {
    font-weight: 500;
}

/* ============================================================
   Header
   ============================================================ */
.main-header {
    position: absolute;
    top: var(--announcement-height);
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--color-navy);
}

.main-header.scrolled {
    position: fixed;
    top: 0;
    background-color: rgba(20, 53, 82, 0.95);
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 40px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--color-white);
}

.header-icon-btn svg {
    width: 18px;
    height: 18px;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--color-burgundy);
    color: var(--color-white);
    font-size: 9px;
    font-weight: 500;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-fast);
}

.cart-count.visible {
    opacity: 1;
    transform: scale(1);
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    flex: 2;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 48px;
}

.nav-list a {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-white);
    padding: 8px 0;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-white);
    transition: width var(--transition-base);
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

.nav-list a:hover {
    opacity: 1;
}

/* Brand Logo */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.brand-logo .brand-ar {
    font-family: var(--font-arabic);
    font-size: 18px;
    font-weight: 400;
    color: var(--color-white);
    direction: rtl;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 26px;
    height: 26px;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background-color: var(--color-white);
    transition: all var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-navy);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav ul {
    text-align: center;
}

.mobile-nav li {
    margin: 24px 0;
}

.mobile-nav a {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-white);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    width: 100%;
    max-width: 480px;
    padding: 0 24px;
    position: relative;
}

.search-form {
    display: flex;
    border-bottom: 1px solid var(--color-black);
}

.search-form input {
    flex: 1;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 300;
    padding: 14px 0;
    border: none;
    outline: none;
    background: transparent;
}

.search-form input::placeholder {
    color: var(--color-gray);
}

.search-form button {
    padding: 14px;
    color: var(--color-black);
}

.search-close {
    position: absolute;
    top: -70px;
    right: 0;
    color: var(--color-black);
}

/* ============================================================
   Products Page Section
   ============================================================ */
.products-page-section {
    background-color: var(--color-cream);
    min-height: calc(100vh - var(--announcement-height) - var(--header-height));
    padding: 0;
}

/* Products Grid - 2 columns layout */
.products-page-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
    margin-right: 100px;
    margin-left: 100px;
    margin-top: 150px;
    margin-bottom: 60px;
}

/* ============================================================
   Product Card
   ============================================================ */
.product-page-card {
    position: relative;
    aspect-ratio: 1/1.15;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--color-cream);
}

/* Background image */
.product-page-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    z-index: 0;
}

.product-page-card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-page-card:hover .product-page-card-bg {
    transform: scale(1.03);
}

/* Theme colors (fallback if no bg image) */
.product-page-card[data-theme="olive"] .product-page-card-bg { 
    background-color: var(--color-olive); 
}
.product-page-card[data-theme="navy"] .product-page-card-bg { 
    background-color: var(--color-navy); 
}
.product-page-card[data-theme="burgundy"] .product-page-card-bg { 
    background-color: var(--color-burgundy); 
}
.product-page-card[data-theme="brown"] .product-page-card-bg { 
    background-color: var(--color-brown); 
}

/* Card Inner Content */
.product-page-card-inner {
    position: relative;
    z-index: 2;
    height: calc(100% - 120px);
    display: flex;
    flex-direction: column;
    padding: 24px 24px 0;
    color: var(--color-white);
}

/* Label Badge (TERLAMBAKAN) */
.product-label-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--color-burgundy);
    color: var(--color-white);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 16px;
    z-index: 2;
}

.product-label-badge.add-to-cart-btn {
    z-index: 10 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto !important;
}

.product-label-badge.add-to-cart-btn:hover {
    background-color: #143552;
    transform: scale(1.05);
}

.product-label-badge.add-to-cart-btn:active {
    transform: scale(0.98);
}

/* Product Image Container */
.product-page-card-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.product-page-card-image img {
    max-height: 280px;
    width: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
    transition: transform var(--transition-base);
}

.product-page-card:hover .product-page-card-image img {
    transform: translateY(-10px);
}

/* ============================================================
   Product Footer Info
   ============================================================ */
.product-page-card-footer {
    position: relative;
    z-index: 2;
    background-color: var(--color-cream);
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px;
}

.product-info-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-name-en {
    font-family: var(--font-primary);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-navy);
    margin: 0;
}

.product-name-ar {
    font-family: var(--font-arabic);
    font-size: 22px;
    font-weight: 400;
    color: var(--color-navy);
    direction: rtl;
}

.product-price {
    font-family: var(--font-primary);
    font-size: 24px;
    font-weight: 500;
    color: var(--color-navy);
}

/* Link Overlay */
.product-page-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
}

/* Hover Effect */
.product-page-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color var(--transition-base);
    z-index: 1;
    pointer-events: none;
}

.product-page-card:hover::before {
    background-color: rgba(0, 0, 0, 0.1);
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 992px) {
    .products-page-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-page-card-image img {
        max-height: 220px;
    }
    
    .product-page-card-footer {
        padding: 24px 28px;
    }
}

@media (max-width: 768px) {
    .products-page-grid {
        grid-template-columns: 1fr;
    }
    
    .product-page-card {
        aspect-ratio: 1/1.2;
    }
    
    .product-page-card-inner {
        padding: 20px 20px 0;
        height: calc(100% - 100px);
    }
    
    .product-label-badge {
        font-size: 8px;
        padding: 7px 14px;
        top: 16px;
        right: 16px;
    }
    
    .product-page-card-image {
        padding: 30px 0;
    }
    
    .product-page-card-image img {
        max-height: 200px;
    }
    
    .product-page-card-footer {
        padding: 20px 24px;
        height: 100px;
    }
    
    .product-name-en {
        font-size: 16px;
    }
    
    .product-name-ar {
        font-size: 20px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .header-solid {
        top: 0;
    }
    
    .page-products {
        padding-top: var(--header-height);
    }
}