:root {
    --primary: #2c3e50;
    --secondary: #e67e22;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f5f6fa;
    max-width: 430px;
    margin: auto;
}

header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: center;
}

.pooja-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.pooja-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.pooja-card:hover {
    transform: translateY(-5px);
}

.pooja-title {
    color: var(--primary);
    margin: 0 0 0.5rem 0;
}

.pooja-desc {
    color: #666;
    font-size: 0.9rem;
}

.cart-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--secondary);
    color: white;
    border: 2px solid var(--secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

.cart-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.cart-count {
    background: var(--primary);
    color: white;
    padding: 3px 9px;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Price styling */
.price-container {
    margin-top: 0.5rem;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 0.5rem;
}

.offer-price {
    color: #27ae60;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

/* Traditional design elements */
header {
    border-bottom: 3px solid #d4af37;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 5px;
    background: #d4af37;
    border-radius: 2px;
}

.modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.back-arrow {
    cursor: pointer;
    margin-right: 1rem;
}

.back-arrow svg {
    width: 24px;
    height: 24px;
    fill: var(--primary);
}

.modal-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.view-details-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 1rem 0 0;
    display: block;
    width: 100%;
    font-weight: 500;
}

.view-details-btn:hover {
    background: #1a252f;
    transform: translateY(-2px);
}

.add-to-cart-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
    margin: 1.5rem 0 0;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
}

/* Modal spacing improvements */
.modal-content {
    margin: 1rem;
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-item {
    padding: 0.8rem 0;
}

/* Cart popup panel */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 999;
}

.cart-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    max-height: 80vh;
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.cart-overlay.open + .cart-panel {
    display: flex;
}

.cart-panel.open {
    display: flex;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.2s;
}

.close-cart:hover {
    color: #e74c3c;
}

.cart-footer {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.checkout-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 1rem;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.checkout-btn:hover {
    opacity: 0.9;
}

.cart-header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.2s;
}

.remove-item:hover {
    opacity: 0.8;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
}

.empty-cart p {
    color: #666;
    margin-bottom: 1rem;
}

.browse-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s;
}

.browse-btn:hover {
    transform: scale(1.05);
}