/* Product Pages Styles */

/* Product Listing Page Styles */
.hero-section {
    background: linear-gradient(to right, #4ade80, #16a34a);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-pill {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    transition: colors 0.3s ease;
    text-decoration: none;
}

.category-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.filter-sidebar {
    position: sticky;
    top: 1rem;
}

.filter-select,
.filter-input {
    transition: all 0.3s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.results-header {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-card {
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    overflow: hidden;
}

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

.product-card .product-image {
    position: relative;
    overflow: hidden;
}

.product-card img {
    transition: transform 0.3s ease;
}

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

.product-card .quick-actions-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.product-card:hover .quick-actions-overlay {
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.product-card .quick-action-btn {
    background: white;
    padding: 0.75rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    transform: scale(0);
}

.product-card:hover .quick-action-btn {
    transform: scale(1);
}

.product-card .quick-action-btn:hover {
    background: #f3f4f6;
}

.stock-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stock-badge.in-stock {
    background: #16a34a;
    color: white;
}

.stock-badge.out-of-stock {
    background: #dc2626;
    color: white;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.category-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}

.category-tag.environment {
    background: #dcfce7;
    color: #16a34a;
}

.category-tag.type {
    background: #dbeafe;
    color: #2563eb;
}

.category-tag.category {
    background: #f3e8ff;
    color: #9333ea;
}

.care-preview {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.care-preview .care-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.care-preview .care-item i {
    margin-right: 0.5rem;
}

.care-preview .sun-icon {
    color: #fbbf24;
}

.care-preview .water-icon {
    color: #60a5fa;
}

/* Single Product Page Styles */
.breadcrumb-nav {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-nav ol {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb-nav a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #16a34a;
}

.product-image-section {
    position: relative;
}

.main-image-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumbnail {
    width: 6rem;
    height: 6rem;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #16a34a;
}

.quick-info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.info-card {
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.info-card.free-delivery {
    background: #dcfce7;
}

.info-card.quality-guaranteed {
    background: #dbeafe;
}

.info-card.expert-support {
    background: #f3e8ff;
}

.info-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.product-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.875rem;
    font-weight: 700;
    color: #16a34a;
}

.care-instructions-card {
    background: linear-gradient(to bottom right, #dcfce7, #dbeafe);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #16a34a;
}

.care-instructions-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.care-item {
    background: white;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.care-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.care-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.care-icon.sunlight {
    background: #fef3c7;
    color: #f59e0b;
}

.care-icon.water {
    background: #dbeafe;
    color: #3b82f6;
}

.care-icon.general {
    background: #dcfce7;
    color: #10b981;
}

.product-features {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 1rem;
}

.product-features h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    color: #374151;
}

.feature-item i {
    color: #10b981;
    margin-right: 0.75rem;
}

.add-to-cart-section {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: #e5e7eb;
    color: #374151;
    border: none;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #d1d5db;
}

.quantity-input {
    width: 6rem;
    padding: 0.75rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background: #16a34a;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background: #15803d;
}

.btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.btn-wishlist {
    background: white;
    color: #ef4444;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: 2px solid #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-wishlist:hover {
    background: #fef2f2;
}

.btn-wishlist.active {
    background: #ef4444;
    color: white;
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    font-size: 0.875rem;
}

.meta-item {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
}

.meta-label {
    color: #6b7280;
    margin-bottom: 0.25rem;
}

/* Product Tabs */
.product-tabs {
    margin-top: 4rem;
}

.tab-nav {
    border-bottom: 1px solid #e5e7eb;
}

.tab-buttons {
    display: flex;
    gap: 2rem;
}

.tab-btn {
    padding: 1rem 0;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #374151;
    border-bottom-color: #d1d5db;
}

.tab-btn.active {
    color: #16a34a;
    border-bottom-color: #16a34a;
}

.tab-content {
    margin-top: 2rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Related Products */
.related-products {
    margin-top: 4rem;
}

.related-products-header {
    text-align: center;
    margin-bottom: 2rem;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-product-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: white;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateX(calc(100% + 1rem));
    transition: all 0.3s ease;
    min-width: 260px;
    max-width: 360px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #10b981;
}

.notification.error {
    background: #ef4444;
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification-content i {
    margin-right: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .category-pills {
        padding: 0 1rem;
    }
    
    .filter-sidebar {
        position: relative;
        margin-bottom: 2rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .product-title {
        font-size: 1.875rem;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .quick-info-cards {
        grid-template-columns: 1fr;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .product-meta {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        overflow-x: auto;
        gap: 1rem;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .main-image {
        height: 300px;
    }
    
    .thumbnail {
        width: 4rem;
        height: 4rem;
    }
    
    .quantity-selector {
        justify-content: center;
    }
}

/* Utility Classes */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
