/* ===== GLOBAL RESET & LAYOUT FIXES ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== THEME VARIABLES ===== */
:root {
    --primary-color: #732d91; /* Canlı Mor */
    --secondary-color: #f7941d; /* Enerjik Turuncu */
    --body-bg: #f4f6f9; /* Açık Gri */
    --text-color: #222222; /* Daha koyu gri */
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Open Sans', sans-serif;
}

body {
    background-color: var(--body-bg);
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.7;
    font-weight: 500;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Utilities */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
}
.btn-primary:hover {
    background-color: #5e2475;
    border-color: #5e2475;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
}
.btn-secondary:hover {
    background-color: #d67d10;
    border-color: #d67d10;
}

/* Header & Nav */
.top-bar {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 5px 0;
    font-size: 0.85rem;
}

.main-header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-bar .form-control {
    border-radius: 20px 0 0 20px;
    border: 1px solid #ced4da;
    border-right: none;
}
.search-bar .btn {
    border-radius: 0 20px 20px 0;
    border: 1px solid #ced4da;
    border-left: none;
    background: #fff;
    color: var(--primary-color);
}

.nav-link {
    color: #333;
    font-weight: 500;
    margin: 0 10px;
}
.nav-link:hover {
    color: var(--primary-color);
}

/* Header blocks used by includes/header.php */
.header-top-bar {
    background: #000;
    border-bottom: 1px solid #111;
    font-size: 0.86rem;
    padding: 0.45rem 0;
}
.header-top-bar .top-left,
.header-top-bar .top-right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.header-top-bar a {
    color: #fff;
    text-decoration: none;
}
.header-top-bar a:hover {
    color: #facc15;
}

.header-main {
    background: #fff;
    padding: 0.7rem 0;
}
.header-logo img {
    width: auto;
    max-width: 180px;
    height: auto;
}
.search-container {
    width: 100%;
}
.search-input-group {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.search-input-group .form-control {
    border: 0;
    box-shadow: none;
    height: 44px;
}
.btn-search {
    border: 0;
    background: #fff;
    color: #0f172a;
    min-width: 46px;
}

.header-actions {
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
    flex-wrap: nowrap;
}
.action-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #0f172a;
    text-decoration: none;
}
.action-item .icon-box {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.action-item .action-label {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-size: 0.9rem;
}
.action-item .action-label span {
    color: #64748b;
    font-size: 0.78rem;
}
.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #f59e0b;
    color: #fff;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-nav-sticky {
    background: #fff;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.all-categories-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    color: #0f172a;
    background: #f8fafc;
    white-space: nowrap;
}
.main-nav-links {
    flex-wrap: wrap;
    overflow: visible;
    gap: 0.15rem;
    row-gap: 0.05rem;
}
.main-nav-links .nav-link {
    margin: 0;
    padding: 0.6rem 0.55rem;
    font-size: 0.9rem;
    white-space: normal;
    color: #334155;
    line-height: 1.15;
    text-align: center;
}

/* Product Cards */
.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}
.product-img-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #fff;
}
.product-img-wrapper > a {
    position: absolute;
    inset: 0;
    display: block;
}
.product-img-wrapper img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

/* Home categories module (current markup) */
.category-grid-card {
    display: block;
    text-align: center;
}
.category-cat-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
}
.category-cat-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-grid-title {
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.25;
}
.product-info {
    padding: 15px;
    text-align: center;
}
.product-title {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3em;
}
.price-box {
    margin-bottom: 10px;
}
.old-price {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: #999;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding-top: 60px;
    margin-top: 60px;
}
footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}
footer a:hover {
    color: var(--secondary-color);
}
footer h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
}
.footer-bottom {
    background-color: #1a252f;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.9rem;
    color: #95a5a6;
}
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    margin-right: 10px;
    transition: all 0.3s;
}
.social-icon:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}
