
/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.custom-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out;
    font-size: inherit;
    font-family: inherit;
    white-space: nowrap;
}

.custom-dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.custom-dropdown-toggle:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.custom-dropdown-toggle::after {
    content: "";
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    transition: transform 0.15s ease-in-out;
}

.custom-dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.custom-dropdown-menu,
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

.custom-dropdown-menu.show,
.dropdown-menu.show {
    display: block !important;
    animation: fadeInDown 0.15s ease-in-out;
}

.custom-dropdown-item,
.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.custom-dropdown-item:hover,
.custom-dropdown-item:focus,
.dropdown-item:hover,
.dropdown-item:focus {
    color: #1e2125;
    background-color: #e9ecef;
    text-decoration: none;
}

.custom-dropdown-item:active,
.dropdown-item:active {
    color: #fff;
    background-color: #0d6efd;
    text-decoration: none;
}

.custom-dropdown-item.disabled,
.custom-dropdown-item:disabled {
    color: #adb5bd;
    pointer-events: none;
    background-color: transparent;
}

.custom-dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

/* Animation */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .custom-dropdown-menu {
        background-color: #343a40;
        border-color: #495057;
        color: #fff;
    }
    
    .custom-dropdown-item {
        color: #fff;
    }
    
    .custom-dropdown-item:hover,
    .custom-dropdown-item:focus {
        background-color: #495057;
        color: #fff;
    }
    
    .custom-dropdown-divider {
        border-top-color: #495057;
    }
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .custom-dropdown-menu {
        min-width: 8rem;
        font-size: 0.875rem;
    }
}

/* Ensure dropdown appears above other elements */
.custom-dropdown {
    z-index: 1000;
}

.custom-dropdown-menu {
    z-index: 1001;
}

/* Background image for shop header */
.bg-image {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%), url('/images/bg-shop.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 600px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    overflow: hidden;
}


.bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Modern product cards */
.product-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-card .card-body {
    padding: 1.5rem;
}

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

.product-card .card-text {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.price-tag {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
}

.btn-add-cart {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgb(5 150 105 / 0.4);
}

/* Category badges */
.category-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .bg-image {
        min-height: 500px;
        background-attachment: scroll;
        padding: 2rem 1rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .product-card .card-img-top {
        height: 180px;
    }
}
