/* ==========================================================
   BETÜŞ BUTİK – MODERN HEADER VE SEPET MODALI (GÜNCELLENDİ)
========================================================== */

.hb-header * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===============================
   DESKTOP HEADER
================================= */
.hb-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 5%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 16px;
    width: 100%;
    background: var(--header-bg);
    color: var(--header-text);
}

.hb-left {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 20px);
    flex-shrink: 0;
}

.hb-logo {
    width: clamp(70px, 8vw, 95px);
    height: clamp(70px, 8vw, 95px);
    object-fit: cover;
    border-radius: 10%;
    aspect-ratio: 1/1;
    border: 2px solid rgba(255,255,255,0.1);
}

.hb-logo-title {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 400;
    white-space: nowrap;
    color: inherit;
}

.hb-right-controls {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 16px);
}

.hb-btn {
    padding: clamp(6px, 1vw, 8px) clamp(12px, 1.5vw, 20px);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(12px, 1.5vw, 14px);
    white-space: nowrap;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
}

.hb-login {
    background: var(--button-color) !important;
    color: white !important;
    border: 2px solid var(--button-color) !important;
}
.hb-login:hover {
    background: color-mix(in srgb, var(--button-color) 90%, #000) !important;
    border-color: color-mix(in srgb, var(--button-color) 90%, #000) !important;
}
.hb-register, .hb-logout {
    background: #ef4444 !important;
    color: white !important;
    border: 2px solid #ef4444 !important;
}
.hb-register:hover, .hb-logout:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}
.hb-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: inherit;
    font-size: 24px;
}

/* ===============================
   DESKTOP NAVIGATION
================================= */
.hb-desktop-nav {
    width: 100%;
    padding: 3px 5%;
    background: var(--menu-bg);
    color: var(--menu-text);
    position: relative;
    z-index: 1000;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 5px;
}

.hb-main-ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: clamp(12px, 2vw, 24px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    flex-wrap: wrap;
}

.hb-menu-item {
    position: relative;
}

.hb-main-ul > .hb-menu-item > .hb-menu-title,
.hb-main-ul > .hb-menu-item > .hb-menu-link {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    font-size: clamp(13px, 1.4vw, 15px);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.hb-main-ul > .hb-menu-item > .hb-menu-title:hover,
.hb-main-ul > .hb-menu-item > .hb-menu-link:hover {
    background: rgba(0,0,0,0.05);
}

.hb-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: white;
    color: #374151;
    padding: 6px 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    display: none;
    z-index: 9999;
    margin-top: 8px;
    border: 1px solid #e5e7eb;
}
.hb-menu-item:hover > .hb-dropdown {
    display: block;
}
.hb-dropdown li {
    padding: 6px 12px;
}
.hb-dropdown li:hover {
    background: #f3f4f6;
}
.hb-dropdown li a {
    display: block;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    color: #374151;
    transition: all 0.2s ease;
}
.hb-dropdown li a:hover {
    color: #111827;
}

/* ===============================
   SEPET İKONU
================================= */
.hb-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
    color: inherit;
}
.hb-cart-icon {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    fill: none;
    transition: all 0.3s ease;
}
.hb-cart:hover .hb-cart-icon {
    transform: scale(1.05);
    stroke-width: 2.2;
}
.hb-cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    background: #ef4444 !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 11px;
    border-radius: 50%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10;
    border: 2px solid var(--header-bg);
}

/* ===============================
   SEPET MODAL
================================= */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}
.cart-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: white;
    z-index: 9999;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    overflow: hidden;
}
.cart-modal.active {
    right: 0;
}
.cart-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.cart-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.close-cart-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.close-cart-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}
.cart-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    min-height: 0;
}
.cart-content::-webkit-scrollbar {
    width: 6px;
}
.cart-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.cart-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.empty-cart i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}
.empty-cart p {
    font-size: 16px;
    margin-bottom: 8px;
}
.btn-shopping {
    padding: 12px 24px;
    background: var(--button-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 16px;
    display: inline-block;
}

/* SEPET ÜRÜN KARTI */
.cart-item {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}
.cart-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.cart-item-content {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.cart-item-image {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
}
.cart-item-image img {
    width: 90px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    min-height: 100%;
}
.cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cart-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin: 0 0 6px 0;
}
.cart-item-title a {
    color: inherit;
    text-decoration: none;
}
.cart-item-title a:hover {
    color: var(--button-color);
}
.cart-item-variant {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}
.variant-label {
    font-weight: 500;
    color: #475569;
    min-width: 40px;
}
.color-display {
    display: flex;
    align-items: center;
    gap: 6px;
}
.color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
}
.cart-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
}
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    width: fit-content;
}
.quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.quantity-btn:hover:not(:disabled) {
    background: var(--button-color);
    border-color: var(--button-color);
    color: white;
}
.quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.quantity-input {
    width: 40px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px;
    font-weight: 600;
    font-size: 14px;
    background: white;
}
.cart-item-remove {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    align-self: flex-start;
}
.cart-item-remove:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-color: #ef4444;
    color: #b91c1c;
}

/* BENZER ÜRÜNLER - Sepet ürünlerinin altında, üst üste binmez */
.similar-products-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    clear: both;
}
.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.similar-product-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}
.similar-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--button-color);
}
.similar-product-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}
.similar-product-info {
    text-align: center;
}
.similar-product-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 32px;
}
.similar-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 6px;
}
.add-to-cart-similar {
    width: 100%;
    padding: 6px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
}
.add-to-cart-similar:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* SEPET FOOTER - Butonlar her zaman yan yana */
.cart-footer {
    padding: 16px 20px;
    background: white;
    border-top: 2px solid #e2e8f0;
    box-shadow: 0 -8px 25px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.cart-footer.hidden {
    display: none;
}
.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}
.total-label {
    font-size: 18px;
    font-weight: 700;
    color: #334155;
}
.total-amount {
    font-size: 24px;
    font-weight: 900;
    color: #10b981;
}
.cart-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px;
    width: 100%;
}
.continue-shopping {
    flex: 1;
    padding: 12px 16px;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
    text-transform: capitalize;
}
.continue-shopping:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.checkout-btn {
    flex: 1;
    padding: 12px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-transform: capitalize;
}
.checkout-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.checkout-btn i {
    font-size: 16px;
}

/* BİLDİRİM MESAJLARI - Sağ üst, max 20px, yeşil arkaplan siyah yazı */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 280px;
    padding: 4px 12px;
    background: #10b981;
    color: #000000;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    line-height: 1.4;
    max-height: 20px;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.notification.show {
    opacity: 1;
    transform: translateX(0);
}
.notification.success {
    background: #10b981;
    color: #000000;
}
.notification.error {
    background: #ef4444;
    color: #ffffff;
}
.notification.info {
    background: #3b82f6;
    color: #ffffff;
}
.notification-content {
    display: flex;
    align-items: center;
    gap: 6px;
}
.notification-content i {
    font-size: 12px;
}

/* MOBİL UYUM - butonlar her zaman yan yana, benzer ürünler 2'li grid */
@media (max-width: 992px) {
    .hb-desktop-nav { display: none; }
    .hb-right-controls .hb-login, .hb-right-controls .hb-register, .hb-right-controls .hb-logout-btn { display: none; }
    .hb-top-row { padding: 4px 4%; }
    .hb-mobile-toggle { display: block; }
    .cart-modal { max-width: 100%; top: 0; height: 90vh; }
    .cart-actions { flex-direction: row !important; }
    .cart-item-content { align-items: flex-start; }
    .cart-item-image img { width: 70px; }
    .similar-products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .similar-product-image { height: 80px; }
}
@media (max-width: 768px) {
    .hb-logo { width: 60px; height: 60px; }
    .hb-logo-title { font-size: 14px; }
    .cart-item-image img { width: 60px; }
    .cart-item-title { font-size: 13px; }
    .cart-item-price { font-size: 15px; }
    .similar-products-grid { grid-template-columns: repeat(2, 1fr); }
    .cart-actions { flex-direction: row !important; }
}
@media (max-width: 480px) {
    .hb-top-row { padding: 2px 3%; }
    .hb-logo { width: 50px; height: 50px; }
    .hb-cart-icon { width: 22px; height: 22px; }
    .cart-item-image img { width: 50px; }
    .cart-item-title { font-size: 12px; }
    .cart-item-price { font-size: 14px; }
    .quantity-btn { width: 24px; height: 24px; }
    .quantity-input { width: 32px; font-size: 12px; }
    .similar-products-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) and (orientation: landscape) {
    .cart-modal { height: 90vh; }
    .cart-content { max-height: calc(100vh - 180px); }
}
@media (prefers-color-scheme: dark) {
    .cart-modal { background: #1e293b; color: #f1f5f9; }
    .cart-header { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); }
    .cart-content { background: #0f172a; }
    .cart-item { background: #1e293b; border-color: #334155; }
    .cart-item-title { color: #f1f5f9; }
    .cart-footer { background: #1e293b; border-top-color: #334155; }
    .continue-shopping { background: #3b82f6; }
    .checkout-btn { background: #10b981; }
    .similar-product-item { background: #1e293b; border-color: #334155; }
    .similar-product-title { color: #f1f5f9; }
    .notification { background: #10b981; color: #000000; }
}

/* MOBİL MENÜ */
.hb-mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
    color: #374151;
}
.hb-mobile-menu.active { left: 0; }
.hb-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
}
.hb-mobile-overlay.active { display: block; }
.hb-mobile-menu-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hb-mobile-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}
.hb-mobile-row {
    padding: 12px 20px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hb-mobile-title { font-size: 15px; font-weight: 500; }
.hb-mobile-arrow {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.3s;
}
.hb-mobile-sub {
    background: #f9fafb;
    display: none;
}
.hb-mobile-sub.active { display: block; }
.hb-mobile-sub li {
    padding: 10px 20px 10px 40px;
    border-bottom: 1px solid #f3f4f6;
}
.hb-mobile-sub a {
    text-decoration: none;
    color: #4b5563;
    font-size: 13px;
}
.hb-mobile-auth {
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hb-mobile-auth a {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
}
.hb-mobile-login { background: #3b82f6; color: white; }
.hb-mobile-register { background: #ef4444; color: white; }