/* Shop Page Styles */

.shop-section {
    padding: 60px 0 80px;
    background: var(--light-color);
}

/* Shop Controls */
.shop-controls {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.search-bar input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    padding: 14px 30px;
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--light-color);
    border: 2px solid #ddd;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--gradient-1);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Product Count */
.product-count {
    margin-bottom: 25px;
}

.product-count p {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.product-count span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-item-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-item:hover .product-item-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gradient-1);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.stock-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--success-color);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.stock-badge.low-stock {
    background: #ffc107;
}

.stock-badge.out-of-stock {
    background: #dc3545;
}

.product-item-details {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-item-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.product-item-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.product-unit {
    font-size: 14px;
    color: #888;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.quick-add-btn {
    flex: 1;
    padding: 12px;
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.view-details-btn {
    padding: 12px 20px;
    background: var(--light-color);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

/* Product Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.product-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    max-width: 900px;
    margin: 50px auto;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-image {
    border-radius: 15px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.modal-details h2 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.modal-category {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.modal-description {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 25px;
}

.modal-price-section {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
}

.modal-unit {
    font-size: 18px;
    color: #888;
}

.modal-stock {
    padding: 10px 15px;
    background: var(--light-color);
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
}

.modal-quantity {
    margin-bottom: 30px;
}

.modal-quantity label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark-color);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qty-btn {
    width: 45px;
    height: 45px;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    font-size: 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.quantity-controls input {
    width: 80px;
    height: 45px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
}

/* Cart Link */
.cart-link {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.cart-count {
    display: none;
    background: var(--primary-color);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideInRight 0.5s ease;
    max-width: 400px;
}

.cart-notification-success {
    background: var(--success-color);
    color: white;
}

.cart-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-notification .notification-icon {
    font-size: 24px;
    font-weight: bold;
}

.cart-notification .notification-message {
    font-size: 16px;
    line-height: 1.5;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .modal-body {
        grid-template-columns: 1fr;
        padding: 30px;
    }
    
    .modal-image img {
        height: 300px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .filter-buttons {
        justify-content: center;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 20px;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .view-details-btn {
        width: 100%;
    }
}
