/* SariStore - Main Stylesheet */

/* CSS Variables */
:root {
    --primary-color: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #f8bbd9;
    --secondary-color: #ff9800;
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-color: #f5f5f5;
    --white: #fff;
    --black: #000;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-sm: 4px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 12px;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-links a {
    color: var(--white);
    margin-left: 20px;
    opacity: 0.9;
}

.header-links a:hover {
    opacity: 1;
}

.header-main {
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    font-size: 20px;
    padding: 8px;
    color: var(--text-color);
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.search-bar {
    flex: 1;
    max-width: 500px;
}

.search-bar form {
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-bar button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-btn {
    position: relative;
    font-size: 22px;
    color: var(--text-color);
    padding: 8px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.main-nav {
    background: var(--white);
    border-top: 1px solid var(--border-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 0;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.has-dropdown .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown li:last-child a {
    border-bottom: none;
}

/* Mobile Menu */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 999;
    transition: var(--transition);
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary-color);
    color: var(--white);
}

.close-menu {
    font-size: 20px;
    color: var(--white);
}

.mobile-nav li a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 300px);
    padding: 20px 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
    padding: 40px 0;
    margin-bottom: 30px;
}

.hero-content {
    text-align: center;
}

.hero-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.hero-content p {
    font-size: 16px;
    color: var(--text-light);
}

/* Filters */
.filters-section {
    background: var(--white);
    padding: 15px 0;
    margin-bottom: 20px;
    border-radius: var(--radius);
}

.filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 5px;
}

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

/* Products Grid */
.products-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-all {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.product-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg-color);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sale-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.original-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.discount {
    font-size: 11px;
    color: var(--success-color);
    font-weight: 500;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-light);
}

.rating {
    display: flex;
    align-items: center;
    gap: 3px;
}

.rating i {
    color: var(--secondary-color);
    font-size: 11px;
}

.free-delivery {
    color: var(--success-color);
    font-weight: 500;
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.product-gallery {
    position: relative;
}

.main-image {
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-color);
}

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

.product-details h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-details .price-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.product-details .sale-price {
    font-size: 24px;
    font-weight: 700;
}

.product-details .original-price {
    font-size: 16px;
}

.product-details .discount {
    font-size: 14px;
    padding: 4px 10px;
    background: var(--success-color);
    color: var(--white);
    border-radius: 4px;
}

.size-selection {
    margin-bottom: 20px;
}

.size-selection h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-option {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.size-option:hover,
.size-option.active {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

.product-description {
    margin-top: 20px;
}

.product-description h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.product-description p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.8;
}

/* Cart Page */
.cart-section {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
}

.cart-header {
    margin-bottom: 20px;
}

.cart-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.cart-item-image {
    width: 100px;
    height: 130px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-color);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.cart-item-details .price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

.cart-item-actions {
    text-align: right;
}

.remove-item {
    color: var(--error-color);
    font-size: 13px;
    padding: 5px 10px;
}

.cart-summary {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 600;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 15px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart i {
    font-size: 60px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-cart p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Category Page */
.category-header {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    text-align: center;
}

.category-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.category-header p {
    color: var(--text-light);
}

/* Ad Containers */
.ad-container {
    margin: 20px 0;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius);
}

.ad-container.top-ad {
    margin-top: 0;
}

/* Footer */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    font-size: 13px;
    color: var(--text-light);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-light);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #e8f5e9;
    color: var(--success-color);
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: var(--error-color);
    border: 1px solid #ffcdd2;
}

.alert-warning {
    background: #fff3e0;
    color: var(--warning-color);
    border: 1px solid #ffe0b2;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-color);
    font-size: 13px;
    border: 1px solid var(--border-color);
}

.pagination a:hover,
.pagination .active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .search-bar {
        display: none;
    }
    
    .main-nav {
        display: none;
    }
    
    .header-top-content {
        justify-content: center;
    }
    
    .header-links {
        display: none;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card {
        border-radius: var(--radius-sm);
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 12px;
        height: 32px;
    }
    
    .sale-price {
        font-size: 14px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
    }
    
    .cart-item-actions {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 10px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-content h2 {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .product-detail {
        padding: 15px;
    }
    
    .product-details h1 {
        font-size: 16px;
    }
    
    .product-details .sale-price {
        font-size: 20px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

header,
.site-header,
.navbar,
.main-header {
    position: static !important;
    top: auto !important;
}
