/* Store Page Styles */

.store-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/static/images/hero-bg.png');
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 100px 20px;
    border-radius: 20px;
    color: white;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.store-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.store-header .lead {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Store Controls */
.store-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #4a7c59;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    color: #4a7c59;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e8f5e9;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #4a7c59, #2d5016);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(45, 80, 22, 0.3);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(255, 179, 0, 0.4);
}

.product-info {
    padding: 20px;
}

.product-category {
    display: inline-block;
    background: #e8f5e9;
    color: #2d5016;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-name {
    font-size: 1.2em;
    color: #2d5016;
    margin-bottom: 8px;
}

.product-description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.4em;
    font-weight: bold;
    color: #2d5016;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(238, 90, 111, 0.4);
}

.add-to-cart-btn.large {
    padding: 15px 30px;
    font-size: 1.1em;
    width: 100%;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-modal {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .product-modal {
    transform: scale(1) translateY(0);
}

.product-modal {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #4a7c59, #2d5016);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f8f8;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2d5016;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #4a7c59, #2d5016);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(45, 80, 22, 0.3);
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 15px;
    background: #f8f8f8;
    margin-bottom: 10px;
}

.cart-item img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    color: #2d5016;
}

.cart-item-qty {
    color: #666;
    font-size: 0.9em;
}

.cart-item-price {
    font-weight: bold;
    color: #2d5016;
    font-size: 1.1em;
}

.remove-item-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s;
}

.remove-item-btn:hover {
    background: #ee5a6f;
    transform: scale(1.1);
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-cart span {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
}

/* Product Modal Content */
.product-modal .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
}

.product-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.product-detail-image {
    height: 100%;
    min-height: 300px;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-detail-info h2 {
    color: #2d5016;
    margin: 10px 0 15px;
}

.product-detail-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.stock-info {
    margin-bottom: 15px;
}

.in-stock {
    color: #4a7c59;
    font-weight: 600;
}

.low-stock {
    color: #ff6b6b;
    font-weight: 600;
}

.product-detail-price {
    font-size: 2em;
    font-weight: bold;
    color: #2d5016;
    margin-bottom: 20px;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #4a7c59, #2d5016);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(45, 80, 22, 0.4);
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .store-controls {
        flex-direction: column;
    }

    .filter-buttons {
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-modal-content {
        grid-template-columns: 1fr;
    }

    .product-detail-image {
        height: 250px;
    }
}

/* Best Sellers Slider */
.best-sellers-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 0;
    margin: 60px 0 0 0;
    overflow: hidden;
}

.slider-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.slider-track {
    display: flex;
    gap: 20px;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.slider-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%);
    }
}

.slide-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    min-width: 250px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slide-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.slide-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slide-info h5 {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: bold;
    margin: 0;
}

.slide-price {
    color: var(--accent-color);
    font-size: 1.2em;
    font-weight: bold;
}

.slide-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.slide-link:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .slider-title {
        font-size: 1.5em;
    }
    
    .slide-card {
        min-width: 200px;
    }
}