:root {
    --primary: #0B2A3B;
    --secondary: #6c757d;
    --cta: #FF6B35;
    --cta-hover: #e05520;
    --bg: #F6F8FA;
    --white: #ffffff;
    --text: #2c3e50;
    --border: #e1e8ed;
    --radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding-bottom: 60px; /* Footer height */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary);
    font-weight: 700;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.announcement-bar {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    font-size: 0.85rem;
    padding: 8px 0;
    font-weight: 500;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    max-height: 90px;
    width: auto;
    transition: all 0.3s ease;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-left: 12px;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.logo-text .text-highlight {
    color: var(--cta);
}

@media (max-width: 768px) {
    .logo-img {
        max-height: 60px;
    }
    
    .logo-text {
        font-size: 1.1rem;
        margin-left: 8px;
    }
    
    .header-inner {
        gap: 10px;
    }
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    padding-left: 45px;
    border: 2px solid var(--border);
    border-radius: 50px;
    background: var(--bg);
    transition: all 0.3s;
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icon-link {
    color: var(--primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
    position: relative;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-icon-link:hover {
    color: var(--cta);
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.nav-icon-link i {
    font-size: 24px;
    margin-bottom: 2px;
}

.nav-badge {
    background: var(--cta);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    position: absolute;
    top: 0;
    right: 0;
}

/* Category Navigation - Corporate Style */
.category-nav {
    background-color: var(--primary); /* Dark Blue Background */
    border-bottom: 4px solid var(--cta); /* Orange Bottom Border */
    padding: 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav .container {
    display: flex;
    gap: 0;
    align-items: center;
    padding: 0;
    height: 50px;
}

.category-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background-color: transparent;
    border-radius: 0;
    border-left: none;
    border-top: none;
    border-bottom: none;
}

.category-link:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.category-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    transform: none;
}

.category-link.active {
    background-color: var(--cta);
    color: var(--white);
    box-shadow: none;
    border-color: transparent;
}

/* Breadcrumb Styles */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 12px 0;
    margin-bottom: 1rem;
    list-style: none;
    background-color: transparent;
    border-radius: 0;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: left;
    padding-right: 0.5rem;
    color: var(--secondary);
    content: "/"; /* Separator */
    font-weight: 400;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--cta);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--secondary);
    font-weight: 400;
    cursor: default;
}

/* Mobile Breadcrumb Optimization */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.8rem;
        padding: 8px 0;
        white-space: nowrap;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }
    
    .breadcrumb::-webkit-scrollbar {
        display: none; /* Hide scrollbar Chrome/Safari */
    }
    
    .breadcrumb-item {
        flex-shrink: 0;
    }
}

/* Grid System */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Product Content & Grid (Used in urunler.php) */
.product-content {
    flex-grow: 1;
}

.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #d1d9e0;
}

.product-image-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #fff;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1rem;
    margin: 0 0 10px;
    line-height: 1.4;
    height: 2.8em; /* Limit to 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: auto;
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.3);
}

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

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Badges */
.badge-pill {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-new {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.badge-discount {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.badge-opportunity {
    background: linear-gradient(135deg, #9b59b6, #8e44ad); /* Purple Gradient */
}

.badge-free-shipping {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* Badge Positioning Container */
.product-badges-top {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px; /* Space between multiple badges */
}

/* Sidebar Layout (Desktop Default) */
.layout-sidebar {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.sidebar-filter {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    display: block;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--primary);
}

/* Sidebar Filter Links - Theme Styled */
.sidebar-filter a {
    display: block;
    padding: 8px 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.sidebar-filter a:hover {
    background-color: #f1f3f5;
    color: var(--primary);
    padding-left: 15px;
}

.sidebar-filter a.text-primary {
    background-color: var(--primary);
    color: var(--white) !important;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(11, 42, 59, 0.2);
}

.filter-overlay {
    display: none;
}

/* Mobile Responsiveness */
.visible-mobile {
    display: none;
}

@media (max-width: 768px) {
    .visible-mobile {
        display: block;
    }
    
    .layout-sidebar {
        flex-direction: column;
    }
    
    .sidebar-filter {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        z-index: 2000;
        padding: 20px;
        overflow-y: auto;
        transition: 0.3s;
        box-shadow: 10px 0 20px rgba(0,0,0,0.1);
    }
    
    .sidebar-filter.active {
        left: 0;
    }
    
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }
    
    .filter-overlay.active {
        display: block;
    }
}

/* Cold Chain Styles */
.cold-chain-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #e3f2fd;
    color: #0d47a1;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.cold-chain-badge i {
    font-size: 1.1rem;
}

/* Footer Styles */
.main-footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 0 30px;
    margin-top: 60px;
    font-family: 'Inter', sans-serif;
    border-top: 5px solid var(--cta); /* Corporate accent */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
    color: var(--white);
    letter-spacing: -0.5px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--cta);
    border-radius: 4px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 14px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--cta);
    padding-left: 8px;
    transform: translateX(2px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-contact-item i {
    font-size: 1.3rem;
    color: var(--cta);
    flex-shrink: 0;
    margin-top: 2px;
}

.copyright-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 50px;
    padding-top: 25px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Home Category Tabs */
.category-tabs-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #ddd #f1f1f1;
}
.category-tabs-wrapper::-webkit-scrollbar {
    height: 4px;
}
.category-tabs-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.category-tabs-wrapper::-webkit-scrollbar-thumb {
    background: #ddd; 
    border-radius: 4px;
}
.category-tabs-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ccc; 
}

.home-cat-tab.active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

@media (max-width: 768px) {
    .category-tabs-wrapper .d-flex {
        justify-content: flex-start !important;
    }
}

/* Features / Assurance Section (Modern Minimalist) */
.features-section-modern {
    background-color: var(--white);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.feature-item-modern {
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.feature-icon-modern {
    font-size: 3.5rem; /* Large icon */
    color: var(--primary);
    margin-bottom: 20px;
    display: inline-block;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.feature-item-modern:hover .feature-icon-modern {
    transform: scale(1.1);
    color: var(--cta);
}

.feature-title-modern {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    margin: 0;
    line-height: 1.5;
    max-width: 250px; /* Prevent too wide text */
}


/* WhatsApp Support Section */
.whatsapp-section {
    background-color: #f0fff4;
    border-color: #d1e7dd;
    transition: all 0.3s ease;
}
.whatsapp-section:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.whatsapp-section .icon-box {
    width: 50px;
    height: 50px;
}

/* Product Detail Price Styles - Updated Colors */
.discount-badge-square {
    background-color: #ffc107; /* Yellow */
    color: #000;
    font-weight: 800;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border-radius: 8px; /* Slightly more rounded */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.product-old-price {
    font-size: 1.2rem;
    color: #999; /* Grey */
    text-decoration: line-through;
    line-height: 1.2;
    margin-bottom: 2px;
}

.product-current-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--cta); /* Orange */
    line-height: 1.1;
    letter-spacing: -1px;
}

/* Mobile Header Adjustments */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        padding-bottom: 5px;
    }
    
    .logo {
        font-size: 1.1rem; /* Slightly smaller for better fit */
        order: 1;
        flex: 1; /* Allow logo to take available space */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-right: 10px;
    }
    
    .nav-actions {
        order: 2;
        flex: 0 0 auto;
        margin-left: 0;
        gap: 5px; /* Tighter gap */
        display: flex;
        align-items: center;
    }
    
    .search-bar {
        order: 3;
        flex: 0 0 100%; /* Full width on new line */
        width: 100%;
        max-width: 100%;
        margin: 10px 0 0 0; /* Add top margin */
        padding: 0;
    }
    
    .search-input {
        height: 40px; 
        padding: 0 15px 0 40px;
        font-size: 13px;
        border-radius: 20px;
        width: 100%;
        display: block;
        margin: 0;
        box-sizing: border-box;
    }
    
    .search-icon {
        font-size: 18px;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .nav-icon-link {
        min-width: 36px;
        height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    
    .nav-icon-link span {
        display: none; /* Hide labels */
    }
    
    .nav-icon-link i {
        font-size: 22px;
        margin-bottom: 0;
    }
    
    .nav-badge {
        top: -2px;
        right: -2px;
        padding: 1px 4px;
        font-size: 0.65rem;
        min-width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--white);
    }
}

/* Stock Status Styles */
.product-card.out-of-stock .product-image-wrapper img {
    filter: grayscale(100%);
    opacity: 0.7;
}

.product-card.out-of-stock .product-info {
    opacity: 0.8;
}

.product-card.out-of-stock .btn-primary {
    background-color: #343a40;
    border-color: #343a40;
    cursor: not-allowed;
    opacity: 0.6;
}

.badge-out-of-stock {
    background-color: #000;
    color: #fff;
    border: 1px solid #fff;
}

.badge-low-stock {
    background-color: #ffc107;
    color: #000;
}

.product-card.out-of-stock {
    background-color: #f8f9fa;
}

/* Mobile Optimization for Product Grid */
@media (max-width: 768px) {
    /* Force 2 columns */
    .grid-products, .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    /* Compact Product Card for Mobile */
    .product-card .product-image-wrapper {
        padding-top: 100%; /* Keep aspect ratio */
    }
    
    .product-card .product-info {
        padding: 10px;
    }
    
    .product-card .product-title {
        font-size: 0.85rem;
        height: 2.8em; /* 2 lines max */
        margin-bottom: 5px;
    }
    
    .product-card .product-price {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .product-card .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        width: 100%;
    }
    
    .product-card .btn i {
        font-size: 1rem;
        margin-right: 3px !important;
    }
    
    /* Adjust badges for small cards */
    .badge-pill {
        padding: 3px 8px;
        font-size: 0.65rem;
    }
    
    /* Ensure sidebar filter doesn't break layout if it pops up */
    .sidebar-filter {
        width: 85%; /* Wider drawer on mobile */
    }
}
