/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --accent-color: #e63946;
    --gold-color: #c9a227;
    --text-color: #333;
    --text-light: #666;
    --white: #fff;
    --black: #000;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --success-color: #10B981;
    --error-color: #EF4444;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-lg: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-color);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: background 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-btn, .cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

.search-btn:hover, .cart-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

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

.cart-btn {
    position: relative;
}

.mobile-menu-btn {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero-title-line {
    font-size: 1.5rem;
    font-weight: 400;
    display: block;
    opacity: 0.9;
}

.hero-title-main {
    font-size: 4.5rem;
    font-weight: 700;
    display: block;
    letter-spacing: 4px;
    animation: fadeInUp 1s ease;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

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

/* Section Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

/* Featured Carousel */
.featured-section {
    padding: 2rem 0;
    background: var(--secondary-color);
}

.carousel-controls {
    display: flex;
    gap: 0.5rem;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.carousel-container {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    min-width: 320px;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.carousel-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.carousel-info {
    padding: 1.5rem;
}

.carousel-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.carousel-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Categories */
.categories-section {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.categories-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--secondary-color);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-item:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.category-icon {
    color: var(--accent-color);
}

.category-item:hover .category-icon {
    color: var(--gold-color);
}

.category-name {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Products Grid */
.products-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

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

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

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

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

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.3rem 0.8rem;
    background: var(--accent-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--border-radius);
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Trust Section */
.trust-section {
    padding: 3rem 2rem;
    background: var(--secondary-color);
}

.trust-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.trust-item svg {
    color: var(--accent-color);
}

.trust-item span {
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--gold-color);
}

.footer-column a, .footer-column p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

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

/* Product Detail Modal */
.product-detail {
    width: 800px;
    padding: 2rem;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 600;
}

.detail-subtitle {
    font-size: 1rem;
    color: var(--text-light);
}

.detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.detail-description {
    color: var(--text-color);
    line-height: 1.8;
}

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

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

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

.quantity-display {
    font-size: 1.2rem;
    font-weight: 600;
}

.add-to-cart-btn {
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.add-to-cart-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Cart Modal */
.cart-content {
    width: 500px;
    padding: 2rem;
}

.cart-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--secondary-color);
}

.cart-header h2 {
    font-size: 1.5rem;
}

.cart-items {
    padding: 1rem 0;
    min-height: 200px;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--secondary-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-price {
    color: var(--accent-color);
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.cart-item-btn:hover {
    background: var(--accent-color);
    color: var(--white);
}

.cart-remove-btn {
    color: var(--error-color);
    margin-left: 0.5rem;
}

.cart-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.cart-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--secondary-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

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

/* Email Verification Modal */
.email-content {
    width: 400px;
    padding: 2rem;
}

.email-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.email-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.email-step {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-step.hidden {
    display: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.8rem 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.code-hint {
    font-size: 0.85rem;
    color: var(--text-light);
}

.send-code-btn, .verify-btn, .resend-btn {
    padding: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.send-code-btn {
    background: var(--accent-color);
    color: var(--white);
}

.send-code-btn:hover {
    background: var(--primary-color);
}

.verify-btn {
    background: var(--success-color);
    color: var(--white);
}

.resend-btn {
    background: var(--secondary-color);
    color: var(--text-color);
    margin-top: 0.5rem;
}

.email-message {
    text-align: center;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.email-message.success {
    color: var(--success-color);
}

.email-message.error {
    color: var(--error-color);
}

/* Payment Modal */
.payment-content {
    width: 450px;
    padding: 2rem;
}

.payment-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.payment-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.payment-total {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--secondary-color);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    background: var(--primary-color);
    color: var(--white);
}

.payment-logo {
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 700;
}

.jazzcash-logo {
    background: #e31837;
    color: var(--white);
}

.easypaisa-logo {
    background: #00a651;
    color: var(--white);
}

.payment-desc {
    font-size: 0.95rem;
}

.payment-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--secondary-color);
}

.payment-info.hidden {
    display: none;
}

.payment-details {
    background: var(--secondary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.payment-details h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.payment-number, .payment-amount-display, .payment-reference {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.payment-number span:last-child,
.payment-amount-display span:last-child,
.payment-reference span:last-child {
    font-weight: 600;
    color: var(--accent-color);
}

.confirm-payment-btn {
    width: 100%;
    padding: 1rem;
    background: var(--success-color);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.confirm-payment-btn:hover {
    background: #059669;
}

/* Success Modal */
.success-content {
    width: 400px;
    padding: 2rem;
    text-align: center;
}

.success-icon {
    margin-bottom: 1.5rem;
}

.success-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.success-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.order-details {
    background: var(--secondary-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.order-details p {
    margin-bottom: 0.3rem;
    color: var(--text-color);
}

.order-details span {
    font-weight: 600;
    color: var(--accent-color);
}

.continue-btn {
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    background: var(--primary-color);
    display: none;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-link {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title-main {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .product-detail-content {
        grid-template-columns: 1fr;
    }
    
    .detail-image {
        height: 300px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .trust-grid {
        gap: 1.5rem;
    }
    
    .categories-grid {
        gap: 1rem;
    }
    
    .category-item {
        padding: 1rem 1.5rem;
    }
    
    .carousel-item {
        min-width: 260px;
    }
    
    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.8rem 1rem;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .hero-title-main {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-image-wrapper {
        height: 160px;
    }
}