/* ============================================
   HERSHEY AMBALAJ - Ek Stiller V8
   Cookie Banner, WhatsApp, Blog, Lazy Load
   ============================================ */

/* ==================== ÇEREZ BİLDİRİMİ ==================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(10px);
    color: white;
    padding: 16px 24px;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-content {
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}
.cookie-content p {
    font-size: 13px;
    margin: 0;
    color: #d6d3d1;
}
.cookie-content p a {
    color: #86efac;
    text-decoration: underline;
}
.cookie-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.btn-sm {
    padding: 8px 16px !important;
    font-size: 12px !important;
}
.btn-outline {
    background: transparent !important;
    border: 1px solid #78716c !important;
    color: #d6d3d1 !important;
}
.btn-outline:hover {
    background: #44403c !important;
}

/* ==================== WHATSAPP BUTONU ==================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

/* ==================== STOK BİTTİ OVERLAY ==================== */
.product-card.out-of-stock .product-card-image::after {
    content: 'Stokta Yok';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}
.out-of-stock .btn { opacity: 0.5; pointer-events: none; }

/* ==================== STOK HABER VER ==================== */
.stock-notify-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.stock-notify-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    font-size: 13px;
    min-width: 0;
}
.stock-notify-form button {
    white-space: nowrap;
}

/* ==================== BİLDİRİM DROPDOWN ==================== */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 100;
    display: none;
}
.notification-dropdown.open { display: block; }
.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f4;
    cursor: pointer;
}
.notification-item:hover { background: #fafaf9; }
.notification-item.unread { background: #f0fdf4; }
.notification-item h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.notification-item p { font-size: 12px; color: #78716c; }
.notification-item time { font-size: 11px; color: #a8a29e; }

/* ==================== LAZY LOADING PLACEHOLDER ==================== */
.lazy-image {
    background: #f5f5f4;
    transition: opacity 0.3s;
}
.lazy-image[data-loaded="false"] { opacity: 0; }
.lazy-image[data-loaded="true"] { opacity: 1; }

/* ==================== İADE FORMU ==================== */
.refund-form { max-width: 600px; }
.refund-form .form-group { margin-bottom: 16px; }
.refund-form label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
.refund-form select,
.refund-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.refund-form textarea { min-height: 120px; resize: vertical; }

/* ==================== KUPON ALANI ==================== */
.coupon-section {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.coupon-section input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    font-size: 14px;
    text-transform: uppercase;
    min-width: 0;
}
.coupon-applied {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    font-size: 13px;
    color: #166534;
}

/* ==================== CHECKOUT CHECKBOXES ==================== */
.checkout-agreements { margin: 16px 0; }
.checkout-agreements label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #57534e;
    margin-bottom: 10px;
    cursor: pointer;
    line-height: 1.5;
}
.checkout-agreements input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.checkout-agreements a {
    color: #16a34a;
    text-decoration: underline;
}

/* ==================== KARGO SEÇİMİ ==================== */
.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .cookie-actions { justify-content: center; }
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    .whatsapp-float svg { width: 24px; height: 24px; }
    .notification-dropdown { width: calc(100vw - 32px); right: -16px; }
    .coupon-section { flex-direction: column; }
    .stock-notify-form { flex-direction: column; }
}
/* === CART DRAWER === */
.cart-drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1000;
    display: none; opacity: 0; transition: opacity 0.3s;
}
.cart-drawer-overlay.open {
    display: block; opacity: 1;
}
.cart-drawer {
    position: fixed; top: 0; right: 0; width: 400px; max-width: 100%; height: 100%;
    background: white; z-index: 1001;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
}
.cart-drawer.open {
    transform: translateX(0);
}
.cart-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid var(--border);
}
.cart-drawer-header h3 { font-size: 18px; font-weight: 800; color: var(--text); margin: 0; }
.cart-drawer-close {
    background: none; border: none; font-size: 24px; color: var(--text-light); cursor: pointer;
    transition: color 0.2s; padding: 4px; display: flex; align-items: center; justify-content: center;
}
.cart-drawer-close:hover { color: var(--danger); }
.cart-drawer-body {
    flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.cart-drawer-footer {
    padding: 20px; border-top: 1px solid var(--border); background: #f8fafc;
}
.cart-drawer-total {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 16px;
}
.cart-drawer-item {
    display: flex; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: 12px; transition: border-color 0.2s;
}
.cart-drawer-item:hover { border-color: #bbf7d0; }
.cart-drawer-img {
    width: 70px; height: 70px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border);
}
.cart-drawer-info {
    flex: 1; display: flex; flex-direction: column; justify-content: space-between;
}
.cart-drawer-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 4px; text-decoration: none; display: block; }
.cart-drawer-title:hover { color: var(--primary); }
.cart-drawer-variant { font-size: 11px; color: var(--text-light); margin-bottom: 6px; }
.cart-drawer-price { font-size: 14px; font-weight: 800; color: var(--primary); }
.cart-drawer-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cart-drawer-qty {
    display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px;
}
.cart-drawer-qty button { background: none; border: none; font-size: 16px; color: var(--text-light); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cart-drawer-qty span { font-size: 12px; font-weight: 700; min-width: 20px; text-align: center; }
.cart-drawer-remove {
    color: var(--danger); background: none; border: none; cursor: pointer; font-size: 12px; font-weight: 600; padding: 4px; display: flex; align-items: center; gap: 2px;
}
.cart-drawer-remove:hover { text-decoration: underline; }

/* ==================== SEARCH AUTOCOMPLETE POPUP ==================== */
.search-autocomplete-popup {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 12px 32px -4px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.04);
    z-index: 1000;
    max-height: 480px;
    overflow-y: auto;
    display: none;
    animation: acSlideDown 0.2s ease;
}
@keyframes acSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.search-ac-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
    background: #fafafa;
}
.search-ac-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s, padding-left 0.15s;
}
.search-ac-item:hover {
    background: var(--primary-light);
    padding-left: 20px;
}
.search-ac-item:last-of-type {
    border-bottom: none;
}
.search-ac-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border-light);
    flex-shrink: 0;
}
.search-ac-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-ac-info {
    flex: 1;
    min-width: 0;
}
.search-ac-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-ac-item:hover .search-ac-name {
    color: var(--primary);
}
.search-ac-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.search-ac-price .price {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
}
.search-ac-price .unit {
    font-size: 11px;
    color: var(--text-lighter);
    font-weight: 500;
}
.search-ac-arrow {
    font-size: 18px;
    color: #d1d5db;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}
.search-ac-item:hover .search-ac-arrow {
    color: var(--primary);
    transform: translateX(2px);
}
.search-ac-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    color: white;
    background: var(--primary);
    border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
    transition: background 0.2s, gap 0.2s;
}
.search-ac-footer:hover {
    background: var(--primary-hover);
    gap: 12px;
}
.search-ac-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.search-ac-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    text-align: center;
}
.search-ac-empty p {
    font-size: 13px;
    color: var(--text-lighter);
    margin: 0;
}

/* Responsive autocomplete */
@media (max-width: 768px) {
    .search-autocomplete-popup {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 120px);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

