@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #ff5c35;
    --primary-hover: #e04620;
    --primary-light: #fff2ee;
    --secondary: #0f172a;
    --secondary-light: #1e293b;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Base Components & Links */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 92, 53, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-light);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover {
    background-color: var(--border-color);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-success {
    background-color: #d1fae5;
    color: var(--success);
}

.badge-warning {
    background-color: #fef3c7;
    color: var(--warning);
}

.badge-danger {
    background-color: #fee2e2;
    color: var(--danger);
}

/* Announcement Bar */
.announcement-bar {
    background-color: var(--primary);
    color: white;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 100;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 1rem;
}

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

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

.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 12px 8px 36px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    width: 200px;
    transition: var(--transition);
}

.search-box input:focus {
    width: 280px;
    border-color: var(--primary);
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.cart-trigger {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.cart-trigger:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

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

/* Hero Section */
.hero {
    position: relative;
    height: 550px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    margin-bottom: 60px;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* Category Cards */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.category-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
}

.category-card span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Product Cards */
.products-section {
    margin-bottom: 60px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
}

.product-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background-color: var(--bg-light);
    position: relative;
}

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

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

.product-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fbbf24;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.product-rating span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
    margin-top: auto;
}

.price-sale {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.price-base {
    font-size: 0.95rem;
    text-decoration: line-through;
    color: var(--text-muted);
}

.price-discount {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--success);
}

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

.product-actions .btn {
    flex-grow: 1;
    padding: 10px;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--secondary);
    color: #94a3b8;
    padding: 70px 0 30px;
    border-top: 1px solid var(--secondary-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--secondary-light);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
}

/* Policy Page Layout */
.policy-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin: 40px 0 80px;
}

.policy-sidebar {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.policy-sidebar h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--secondary);
}

.policy-menu {
    list-style: none;
}

.policy-menu li {
    margin-bottom: 8px;
}

.policy-menu li a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 500;
    color: var(--text-muted);
}

.policy-menu li a:hover,
.policy-menu li.active a {
    background-color: var(--primary-light);
    color: var(--primary);
}

.policy-content {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
}

.policy-header {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.policy-badge {
    margin-bottom: 10px;
}

.policy-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
}

.policy-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.policy-section {
    margin-bottom: 35px;
}

.policy-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 12px;
}

.policy-section p {
    font-size: 1.02rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 10px;
}

/* Flash Messages */
.flash-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: fadeIn 0.4s ease-out;
}

.flash-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Shopping Cart View */
.cart-table-wrapper {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.cart-table th {
    background-color: var(--bg-light);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.cart-table td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.cart-product-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

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

.cart-product-info h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 4px;
}

.cart-product-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.quantity-control button {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-control button:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

.quantity-control input {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    font-weight: 600;
}

.remove-cart-item {
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
}

.remove-cart-item:hover {
    background-color: #fee2e2;
}

/* Cart Summary Page */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    margin: 40px 0 80px;
}

.summary-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    height: fit-content;
}

.summary-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--secondary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

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

/* Checkout Page Grid */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 30px;
    margin: 40px 0 80px;
}

.checkout-section {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 35px;
    margin-bottom: 25px;
}

.checkout-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-light);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.gateway-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gateway-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    gap: 15px;
}

.gateway-card:hover {
    border-color: var(--primary);
    background-color: var(--bg-light);
}

.gateway-card input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--primary);
}

.gateway-info h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 4px;
}

.gateway-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.gateway-card.selected {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

/* UPI Payment Details overlay */
.upi-payment-details {
    margin-top: 25px;
    background-color: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.qr-code-box {
    margin: 20px auto;
    width: 180px;
    height: 180px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-box img {
    width: 100%;
    height: 100%;
}

.upi-id-badge {
    display: inline-block;
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #bbf7d0;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    color: #15803d;
    margin: 10px 0;
}

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

/* Responsive grid changes */
@media (max-width: 991px) {
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .policy-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .header-container {
        height: 70px;
    }
    
    .nav-links {
        display: none; /* simple burger menu can be active in JS */
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
}
