/* Storefront Styles */
:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --accent: #f59e0b;
}

body {
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-content {
    flex: 1 0 auto;
}

.storefront-footer {
    margin-top: auto;
}

/* Top Bar */
.top-bar {
    font-size: 0.8rem;
    position: relative;
    z-index: 1080;
}

.top-bar .dropdown-menu {
    z-index: 1085;
}

.currency-dropdown-menu .currency-search-input {
    border-radius: 8px;
    font-size: 0.8rem;
}

.currency-dropdown-menu .dropdown-item {
    border-radius: 8px;
    margin: 2px 6px;
    width: auto;
}

/* Tom Select polish */
.ts-wrapper.form-select,
.ts-wrapper.single .ts-control {
    border-radius: 10px !important;
    min-height: 38px;
}

.ts-dropdown {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.ts-dropdown .option.active {
    background: #eef2ff;
    color: #312e81;
}

/* Header */
.main-header .navbar-brand {
    color: var(--primary);
}

/* Modern Search Autocomplete */
.search-autocomplete-dropdown {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    max-height: 460px;
    overflow-y: auto;
}

.search-ac-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.search-ac-item:hover,
.search-ac-item.active {
    background: #f8fafc;
}

.search-ac-thumb {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}

.search-ac-meta {
    min-width: 0;
    flex: 1;
}

.search-ac-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-ac-title mark {
    background: #fef08a;
    color: inherit;
    padding: 0;
}

.search-ac-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.search-ac-price {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}

.search-ac-price span {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--primary);
}

.search-ac-price small {
    font-size: 0.72rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.search-ac-view-all {
    display: block;
    text-decoration: none;
    padding: 0.7rem 0.85rem;
    background: #f8fafc;
    color: #334155;
    font-size: 0.86rem;
}

.search-ac-view-all:hover {
    background: #eef2ff;
}

.search-ac-loading,
.search-ac-empty {
    padding: 0.85rem;
    font-size: 0.86rem;
    color: #64748b;
}

/* Product Cards */
.product-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

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

.product-card .product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f8fafc;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card .product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
}

.product-card .product-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
    z-index: 2;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-card .product-actions .btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card .product-actions .btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.product-card .product-info {
    padding: 1rem;
}

.product-card .product-title {
    font-weight: 500;
    font-size: 0.95rem;
    color: #1e293b;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-card .product-title:hover {
    color: var(--primary);
}

.product-card .product-category {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .product-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.15rem;
}

.product-card .product-price .original-price {
    font-weight: 400;
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.product-card .product-rating {
    color: var(--accent);
    font-size: 0.8rem;
}

.product-card .add-to-cart-btn {
    width: 100%;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    color: #fff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('/images/hero-pattern.svg') center/cover;
    opacity: 0.1;
}

.hero-section h1 {
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.1;
}

.hero-section p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Modern Hero Slider */
.hero-slider-section .carousel-item {
    min-height: 62vh;
    background-size: cover;
    background-position: center center;
    position: relative;
}

.hero-slider-section .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.62), rgba(79, 70, 229, 0.45));
}

.hero-slider-section .hero-content {
    position: relative;
    min-height: 62vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-slider-section .carousel-control-prev,
.hero-slider-section .carousel-control-next {
    width: 7%;
}

.hero-slider-section .carousel-control-prev-icon,
.hero-slider-section .carousel-control-next-icon {
    width: 2.3rem;
    height: 2.3rem;
    background-color: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(3px);
}

.hero-slider-section .carousel-indicators [data-bs-target] {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 3px;
}

/* Section Headers */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-weight: 700;
    font-size: 1.75rem;
    color: #1e293b;
}

.section-header p {
    color: #64748b;
}

/* Category Cards */
.category-card {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: all 0.3s;
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    color: var(--primary);
    transform: translateY(-2px);
}

.category-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: block;
}

/* Homepage Modern Enhancements */
.modern-section-title {
    letter-spacing: -0.02em;
}

.quick-chip {
    transition: all 0.2s ease;
}
.quick-chip:hover {
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
    color: #3730a3 !important;
}
.quick-chip.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.btn-modern {
    border: none;
    color: #fff;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-modern:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.32);
}

.category-modern-card {
    position: relative;
    overflow: hidden;
}
.category-modern-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 15%, rgba(79,70,229,0.09), transparent 45%);
    pointer-events: none;
}
.category-modern-card .category-icon-wrap {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    margin: 0 auto 0.65rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(79,70,229,0.16), rgba(124,58,237,0.12));
    transition: transform 0.25s ease, background 0.25s ease;
}
.category-modern-card:hover .category-icon-wrap {
    transform: translateY(-3px) scale(1.04);
    background: linear-gradient(135deg, rgba(79,70,229,0.22), rgba(124,58,237,0.18));
}

.category-modern-card .category-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: auto;
    margin-right: auto;
    color: #4f46e5;
    font-weight: 600;
}

/* Cart Page */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Checkout */
.checkout-step {
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    margin-bottom: 1rem;
}

/* Order Tracking */
.tracking-timeline {
    position: relative;
    padding-left: 2rem;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.tracking-step {
    position: relative;
    padding-bottom: 1.5rem;
}

.tracking-step::before {
    content: '';
    position: absolute;
    left: -1.65rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px solid #fff;
}

.tracking-step.active::before {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.tracking-step.completed::before {
    background: #10b981;
}

/* Chatbot Widget — all styles in _chatbot.blade.php partial */

/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    width: fit-content;
}

.qty-control .btn {
    border: none;
    border-radius: 0;
    padding: 0.25rem 0.75rem;
    color: #64748b;
}

.qty-control .qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 0.25rem;
    font-weight: 500;
}

.qty-control .qty-input:focus {
    outline: none;
}

/* Product detail gallery */
.product-gallery-main {
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f8fafc;
    aspect-ratio: 1;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.product-gallery-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}

.product-gallery-thumbs img.active,
.product-gallery-thumbs img:hover {
    border-color: var(--primary);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Product overlay for quick actions */
.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}
.product-card:hover .product-overlay {
    opacity: 1;
}

/* Star Rating Input */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
}
.star-rating input { display: none; }
.star-rating label { cursor: pointer; font-size: 1.5rem; color: #d1d5db; transition: color 0.2s; }
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color: #f59e0b; }

/* Toast notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

/* Responsive */
@media (max-width: 767px) {
    .top-bar .container {
        gap: 0.5rem;
    }

    .hero-section {
        min-height: auto !important;
        padding: 2.25rem 0 !important;
    }
    .hero-slider-section .carousel-item,
    .hero-slider-section .hero-content {
        min-height: 52vh;
    }
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section .lead { font-size: 0.95rem; }
    .hero-slider-section h1 { font-size: 1.8rem; }
    .hero-slider-section .lead { font-size: 0.95rem; }

    .hero-section .input-group.input-group-lg > .form-control,
    .hero-section .input-group.input-group-lg > .btn,
    .hero-slider-section .input-group.input-group-lg > .form-control,
    .hero-slider-section .input-group.input-group-lg > .btn {
        height: 46px;
        font-size: 0.95rem;
    }

    .main-header .navbar-brand {
        font-size: 1.1rem !important;
    }

    #searchInput {
        min-height: 44px;
    }
    #searchSuggestions {
        max-height: 260px;
        overflow-y: auto;
        border-radius: 12px;
    }

    .search-ac-item {
        padding: 0.6rem 0.65rem;
    }
    .search-ac-thumb {
        width: 40px;
        height: 40px;
    }

    .section-head-mobile {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    #homeQuickNav {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap !important;
        padding-bottom: 0.2rem;
    }

    .category-card {
        padding: 1rem 0.75rem;
    }

    .product-card .card-img-top {
        height: 170px !important;
    }
    .product-overlay {
        position: static;
        opacity: 1;
        background: transparent;
        padding: 0.4rem 0.6rem 0.6rem;
        justify-content: flex-end;
    }
    .product-overlay .btn {
        width: 38px;
        height: 38px;
    }

    .cart-item {
        align-items: flex-start;
        gap: 0.75rem;
    }
    .cart-item img {
        width: 64px;
        height: 64px;
    }

    .sticky-top {
        position: static !important;
        top: auto !important;
    }

    .mobile-stack {
        flex-direction: column;
        align-items: stretch !important;
    }

    .mobile-full-btn {
        width: 100%;
    }

    .tab-content {
        padding: 1rem !important;
    }

    .chatbot-panel { width: calc(100vw - 2rem); right: -0.5rem; }
    .product-card .product-actions { opacity: 1; transform: translateX(0); }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
