/* =====================================================
   JugalStore - Custom Styles (Enhanced)
   ===================================================== */

/* ---------- General ---------- */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
}

/* ---------- Announcement Bar ---------- */
.announcement-bar {
    background: linear-gradient(90deg, #ff6b35, #f7931e, #ff6b35);
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
}

@keyframes shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ---------- Hero Image Slider ---------- */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.slider-img {
    height: 350px;
    object-fit: cover;
    filter: brightness(0.45);
}

.carousel-caption-custom {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    text-align: center;
    padding: 0 15%;
    color: #fff;
    z-index: 10;
}

.carousel-caption-custom h1 {
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    line-height: 1.15;
    font-size: 2.2rem;
}

.carousel-caption-custom .lead {
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Slider nav arrows */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    opacity: 1;
    z-index: 10;
}

.carousel-arrow-prev,
.carousel-arrow-next {
    display: inline-block;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(6px);
    border-radius: 50%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
}

.carousel-arrow-prev {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
}

.carousel-arrow-next {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

.carousel-control-prev:hover .carousel-arrow-prev,
.carousel-control-next:hover .carousel-arrow-next {
    background-color: rgba(255,255,255,0.4);
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background-color: transparent;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #ffc107;
    border-color: #ffc107;
    opacity: 1;
    transform: scale(1.2);
}

/* Slide-in animation */
.carousel-item.active .carousel-caption-custom {
    animation: slideUp 0.8s ease-out forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(-40%); }
    to   { opacity: 1; transform: translateY(-50%); }
}

/* ---------- Auto-Suggest Search ---------- */
.search-wrapper .input-group {
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
}

.search-wrapper .input-group .input-group-text {
    border: none;
    padding-left: 16px;
}

.search-wrapper .search-input {
    border: none;
    padding-left: 0;
    font-size: 0.9rem;
}

.search-wrapper .search-input:focus {
    box-shadow: none;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 12px 12px;
    max-height: 420px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f1f1;
    text-decoration: none;
    color: inherit;
}

.search-suggestion-item:hover,
.search-suggestion-item.highlighted {
    background-color: #f0f7ff;
}

.search-suggestion-item img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-suggestion-item .suggestion-info {
    flex: 1;
    min-width: 0;
}

.search-suggestion-item .suggestion-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-item .suggestion-name .highlight {
    background: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}

.search-suggestion-item .suggestion-meta {
    font-size: 0.78rem;
    color: #6c757d;
}

.search-suggestion-item .suggestion-price {
    font-weight: 700;
    color: #198754;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.search-category-item {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f1f1;
}

.search-category-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.search-category-item a:hover {
    color: #0d6efd;
}

.search-view-all {
    display: block;
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #0d6efd;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.search-view-all:hover {
    background: #e9ecef;
    color: #0a58ca;
}

.search-no-results {
    padding: 24px 16px;
    text-align: center;
    color: #6c757d;
}

/* ---------- Product Card ---------- */
.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-card .card-img-top {
    height: 250px;
    object-fit: cover;
    background-color: #e9ecef;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
}

.product-card .card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.product-card .card-title a {
    color: #212529;
}

.product-card .card-title a:hover {
    color: #0d6efd;
}

.product-card .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #198754;
}

.product-card .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-left: 6px;
}

.product-card .badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

/* ---------- Category Card ---------- */
.category-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #fff;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.category-card h4 {
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
}

.category-card p {
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.cat-men    { background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%); }
.cat-women  { background: linear-gradient(135deg, #e91e63 0%, #ff6090 100%); }
.cat-kids   { background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%); }

/* ---------- Deals Section ---------- */
.deals-section {
    background: linear-gradient(135deg, #fff5f5 0%, #fef3e2 100%);
}

/* ---------- Promo Banners ---------- */
.promo-banner {
    min-height: 260px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.promo-banner:hover {
    transform: translateY(-5px);
}

.promo-men {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 80%);
}

.promo-men::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.promo-women {
    background: linear-gradient(135deg, #8e2de2 0%, #e91e63 100%);
}

.promo-women::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

/* ---------- Testimonials ---------- */
.testimonials-section {
    background: #f0f4f8;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ---------- Trust Badges ---------- */
.trust-badge {
    padding: 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.trust-badge:hover {
    opacity: 1;
}

/* ---------- Filters Sidebar ---------- */
.filter-section .form-check {
    padding: 4px 0 4px 1.5rem;
}

.filter-section h6 {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #555;
}

/* ---------- Product Detail ---------- */
.product-detail-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    background-color: #e9ecef;
}

.size-btn {
    min-width: 48px;
    margin-right: 6px;
    margin-bottom: 6px;
}

.size-btn.active {
    background-color: #212529;
    color: #fff;
    border-color: #212529;
}

/* ---------- Cart ---------- */
.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #e9ecef;
}

/* ---------- Checkout ---------- */
.payment-option {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.payment-option:hover,
.payment-option.selected {
    border-color: #0d6efd;
    background-color: #f0f7ff;
}

.payment-option input[type="radio"] {
    transform: scale(1.2);
}

/* ---------- Order Status Badge ---------- */
.status-pending    { background-color: #ffc107; color: #000; }
.status-confirmed  { background-color: #17a2b8; color: #fff; }
.status-shipped    { background-color: #6f42c1; color: #fff; }
.status-delivered  { background-color: #198754; color: #fff; }
.status-cancelled  { background-color: #dc3545; color: #fff; }

/* ---------- Admin ---------- */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background-color: #1a1a2e;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link i {
    width: 24px;
    text-align: center;
}

.stat-card {
    border: none;
    border-radius: 12px;
    padding: 24px;
    color: #fff;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    top: 20px;
}

.stat-card h3 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 4px;
}

.stat-card p {
    margin-bottom: 0;
    opacity: 0.85;
}

.bg-gradient-primary   { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.bg-gradient-success   { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.bg-gradient-warning   { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.bg-gradient-info      { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

/* ---------- Auth Pages ---------- */
.auth-wrapper {
    max-width: 450px;
    margin: 40px auto;
}

.auth-wrapper .card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* ---------- Misc ---------- */
.breadcrumb-item + .breadcrumb-item::before {
    content: "\203A";
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wishlist-btn:hover {
    background: #fff;
    color: #dc3545;
}

.wishlist-btn.active {
    color: #dc3545;
}

/* ---------- Footer Enhancements ---------- */
footer a.text-muted:hover {
    color: #ffc107 !important;
    transition: color 0.2s ease;
}

footer .d-flex a.fs-5:hover {
    color: #ffc107 !important;
    transform: translateY(-2px);
    display: inline-block;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .slider-img {
        height: 300px;
    }
    .carousel-caption-custom {
        padding: 0 8%;
    }
    .carousel-caption-custom h1 {
        font-size: 1.8rem;
    }
    .carousel-caption-custom .lead {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .announcement-bar {
        font-size: 0.75rem;
    }
    .slider-img {
        height: 240px;
    }
    .carousel-caption-custom h1 {
        font-size: 1.4rem;
    }
    .carousel-caption-custom .lead {
        display: none;
    }
    .carousel-caption-custom .btn-lg {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    .carousel-arrow-prev,
    .carousel-arrow-next {
        width: 36px;
        height: 36px;
        background-size: 14px;
    }
    .product-card .card-img-top {
        height: 200px;
    }
    .promo-banner {
        min-height: 200px;
    }
    .promo-banner h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .slider-img {
        height: 200px;
    }
    .carousel-caption-custom h1 {
        font-size: 1.15rem;
    }
    .carousel-caption-custom .badge {
        font-size: 0.65rem !important;
        margin-bottom: 8px !important;
    }
    .carousel-caption-custom .btn-lg {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
    .category-card {
        min-height: 140px;
    }
    .category-card h4 {
        font-size: 1.3rem;
    }
}
