/* ====== E-Ticaret Frontend CSS ====== */
:root {
    --primary: #4e73df;
    --primary-dark: #3a5bc7;
    --secondary: #1e2a4a;
    --success: #1cc88a;
    --danger: #e74a3b;
    --warning: #f6c23e;
    --gray: #6c757d;
    --light: #f8f9fc;
    --border: #e3e6f0;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 5px 25px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }
body { font-family: var(--font); color: #333; background: #fff; margin: 0; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* Announcement Bar */
.announcement-bar { padding: 6px 0; font-size: 13px; font-weight: 500; overflow: hidden; position: relative; }
.announcement-text { display: flex; gap: 80px; animation: marquee 20s linear infinite; white-space: nowrap; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Top Bar */
.top-bar { background: var(--secondary); color: #fff; font-size: 13px; padding: 6px 0; }
.top-bar a { color: rgba(255,255,255,0.8); font-size: 13px; }
.top-bar a:hover { color: #fff; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--border); padding: 15px 0; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-logo img { max-height: 45px; }
.logo-text { font-size: 24px; font-weight: 700; color: var(--secondary); }
.header-search { flex: 1; max-width: 500px; display: flex; gap: 0; }
.header-search .form-control { border-radius: var(--radius) 0 0 var(--radius); border-right: 0; }
.header-search .btn { border-radius: 0 var(--radius) var(--radius) 0; padding: 8px 18px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-action { display: flex; align-items: center; gap: 6px; color: var(--secondary); font-size: 14px; font-weight: 500; background: none; border: none; cursor: pointer; position: relative; padding: 6px; }
.header-action:hover { color: var(--primary); }
.header-action i { font-size: 20px; }
.cart-badge { position: absolute; top: -2px; right: -6px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.mobile-search { margin-top: 10px; display: flex; gap: 8px; }
.mobile-search .form-control { font-size: 14px; }

/* Navigation */
.site-nav { background: var(--primary); }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; }
.nav-menu > li { position: relative; }
.nav-menu > li > a { display: block; padding: 12px 18px; color: rgba(255,255,255,0.9); font-weight: 500; font-size: 14px; transition: background 0.2s; }
.nav-menu > li > a:hover, .nav-menu > li:hover > a { background: rgba(255,255,255,0.1); color: #fff; }
.nav-dropdown { position: absolute; top: 100%; left: 0; background: #fff; min-width: 220px; box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius) var(--radius); list-style: none; padding: 8px 0; margin: 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s; z-index: 50; }
.has-dropdown:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown li a { display: block; padding: 8px 20px; color: #333; font-size: 14px; }
.nav-dropdown li a:hover { background: var(--light); color: var(--primary); }

/* Mobile Menu */
.mobile-menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; opacity: 0; visibility: hidden; transition: all 0.3s; }
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu { position: fixed; top: 0; left: -300px; width: 300px; height: 100vh; background: #fff; z-index: 201; transition: left 0.3s; overflow-y: auto; }
.mobile-menu.open { left: 0; }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 18px; }
.mobile-menu-header button { background: none; border: none; font-size: 20px; cursor: pointer; color: #333; }
.mobile-menu-list { list-style: none; padding: 0; margin: 0; }
.mobile-menu-list li a { display: block; padding: 12px 20px; color: #333; border-bottom: 1px solid #f0f0f0; font-size: 15px; }
.mobile-menu-list li a:hover { background: var(--light); color: var(--primary); }
.mobile-menu-list .divider { border-top: 2px solid var(--border); margin: 5px 0; }

/* Main Content */
.site-main { min-height: 60vh; }

/* Product Card */
.product-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: all 0.3s; height: 100%; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.product-card-img { position: relative; padding-top: 100%; overflow: hidden; }
.product-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.product-card-body { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.product-card-title { font-size: 14px; font-weight: 500; color: #333; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.product-card-title a { color: inherit; }
.product-card-title a:hover { color: var(--primary); }
.product-card-price { font-size: 18px; font-weight: 700; color: var(--primary); }
.product-card-price .old-price { font-size: 13px; color: var(--gray); text-decoration: line-through; font-weight: 400; margin-left: 8px; }
.product-card-actions { margin-top: 10px; }

/* Slider */
.hero-slider { position: relative; overflow: hidden; }
.hero-slider .carousel-item img { width: 100%; max-height: 500px; object-fit: cover; }
.hero-slider .carousel-caption { background: rgba(0,0,0,0.4); border-radius: var(--radius); padding: 20px 30px; }

/* Section Titles */
.section-title { font-size: 24px; font-weight: 700; color: var(--secondary); margin-bottom: 30px; position: relative; padding-bottom: 12px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 3px; background: var(--primary); border-radius: 2px; }
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }

/* Banner */
.banner-img { border-radius: var(--radius); overflow: hidden; transition: all 0.3s; display: block; }
.banner-img:hover { opacity: 0.9; transform: scale(1.01); }
.banner-img img { width: 100%; display: block; }

/* Cart Page */
.cart-item { display: flex; align-items: center; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.cart-item-img { width: 80px; height: 80px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: 500; margin-bottom: 4px; }
.cart-item-price { font-weight: 700; color: var(--primary); }
.qty-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; width: fit-content; }
.qty-input button { background: var(--light); border: none; width: 32px; height: 32px; cursor: pointer; font-size: 16px; }
.qty-input input { width: 45px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); height: 32px; font-size: 14px; }

/* Checkout */
.checkout-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 25px; margin-bottom: 20px; }
.checkout-section h4 { margin-bottom: 20px; font-size: 18px; }

/* Account */
.account-sidebar .list-group-item.active { background: var(--primary); border-color: var(--primary); }

/* Footer */
.site-footer { margin-top: 40px; }
.site-footer.has-mobile-menu { margin-bottom: 60px; }
.footer-logo { max-height: 40px; filter: brightness(0) invert(1); }
.footer-title { font-weight: 600; margin-bottom: 15px; text-transform: uppercase; font-size: 14px; letter-spacing: 0.5px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-contact { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.footer-contact li { margin-bottom: 10px; color: rgba(255,255,255,0.7); }
.footer-contact a { color: rgba(255,255,255,0.7); }
.footer-contact a:hover { color: #fff; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #fff; margin-right: 8px; transition: background 0.2s; }
.footer-social a:hover { background: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 15px 0; text-align: center; font-size: 13px; opacity: 0.7; }

/* WhatsApp Widget */
.whatsapp-widget { position: fixed; bottom: 25px; z-index: 99; width: 56px; height: 56px; background: #25d366; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 15px rgba(37,211,102,0.4); transition: transform 0.3s; }
.whatsapp-widget.right { right: 25px; }
.whatsapp-widget.left { left: 25px; }
.whatsapp-widget:hover { transform: scale(1.1); color: #fff; }

/* Mobile Bottom Menu */
.mobile-bottom-menu { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 6px 0; z-index: 100; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.mbm-item { display: flex; flex-direction: column; align-items: center; font-size: 10px; color: var(--gray); text-decoration: none; padding: 4px 8px; }
.mbm-item i { font-size: 18px; margin-bottom: 2px; }
.mbm-item:hover, .mbm-item.active { color: var(--primary); }

/* Toast Notification */
.toast-notification { position: fixed; top: 20px; right: 20px; z-index: 9999; padding: 14px 24px; border-radius: var(--radius); color: #fff; font-size: 14px; font-weight: 500; transform: translateX(120%); transition: transform 0.3s; box-shadow: var(--shadow-lg); }
.toast-notification.show { transform: translateX(0); }
.toast-notification.success { background: var(--success); }
.toast-notification.error { background: var(--danger); }

/* Breadcrumb */
.page-breadcrumb { background: var(--light); padding: 12px 0; margin-bottom: 30px; }
.page-breadcrumb .breadcrumb { margin: 0; font-size: 13px; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 48px; color: #ddd; margin-bottom: 15px; }
.empty-state p { color: var(--gray); font-size: 16px; }

/* Auth Pages */
.auth-container { max-width: 440px; margin: 40px auto; }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 35px; box-shadow: var(--shadow); }

/* Pagination */
.pagination .page-link { color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* Product Detail */
.product-gallery { position: relative; }
.product-gallery .main-image { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.product-gallery .main-image img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.product-thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; transition: border-color 0.2s; }
.product-thumbs img:hover, .product-thumbs img.active { border-color: var(--primary); }
.product-info .product-title { font-size: 24px; font-weight: 700; color: var(--secondary); margin-bottom: 10px; }
.product-info .product-price { font-size: 28px; font-weight: 700; color: var(--primary); margin: 15px 0; }
.product-info .product-price .old { font-size: 18px; color: var(--gray); text-decoration: line-through; font-weight: 400; }
.product-info .stock-status { font-size: 14px; }

/* Responsive */
@media (max-width: 991px) {
    .header-search { display: none !important; }
    .site-nav { display: none !important; }
    .site-main { padding-bottom: 70px; }
    .site-footer { margin-bottom: 60px; }
}

@media (max-width: 767px) {
    .product-card-price { font-size: 16px; }
    .section-title { font-size: 20px; }
    .hero-slider .carousel-item img { max-height: 250px; }
    .auth-container { margin: 20px auto; padding: 0 15px; }
}

/* Skeleton Loading */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton 1.5s infinite; border-radius: var(--radius); }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
