/**
 * E-Commerce Structure CSS
 * Compatible with pure JS (localStorage) - no backend required
 */

/* E-Commerce Store Container */
.ecom-store {
    padding: 40px 20px;
    background: linear-gradient(180deg, #fafbfc 0%, #f5f8fc 100%);
    border-radius: 20px;
    margin: 40px 0;
}

.ecom-header {
    text-align: center;
    margin-bottom: 50px;
}

.ecom-header h2 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #0f1f3f;
    margin-bottom: 12px;
}

.ecom-header p {
    color: #304466;
    font-size: 1.05rem;
}

/* Products Grid */
.ecom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1400px;
    margin: 0 auto;
}

.ecom-product {
    background: #ffffff;
    border: 1px solid rgba(16, 178, 242, 0.15);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ecom-product:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(16, 178, 242, 0.15);
}

.ecom-product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(16, 178, 242, 0.1), rgba(53, 211, 168, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #10b2f2;
    font-weight: 900;
}

.ecom-product-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ecom-product-name {
    font-size: 1.2rem;
    font-weight: 900;
    color: #0f1f3f;
    margin-bottom: 8px;
}

.ecom-product-description {
    color: #304466;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.ecom-product-features {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    font-size: 0.85rem;
    color: #304466;
}

.ecom-product-features li {
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.ecom-product-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b2f2;
    font-weight: 900;
}

.ecom-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(16, 178, 242, 0.1);
}

.ecom-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: #10b2f2;
}

.ecom-add-btn {
    background: linear-gradient(120deg, #10b2f2, #00d4ff);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ecom-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(16, 178, 242, 0.3);
}

/* Shopping Cart */
.ecom-cart-summary {
    background: linear-gradient(135deg, #0f2551 0%, #132f56 100%);
    color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    max-width: 400px;
    margin: 40px auto;
    margin-top: 60px;
    box-shadow: 0 12px 40px rgba(15, 37, 81, 0.3);
}

.ecom-cart-summary h3 {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.ecom-cart-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(248, 251, 255, 0.95);
}

.ecom-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 900;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.ecom-checkout-btn {
    width: 100%;
    background: linear-gradient(120deg, #ff6b6b, #ee5a6f);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    margin-top: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ecom-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.3);
}

.ecom-checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Empty Cart Message */
.ecom-empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #304466;
}

.ecom-empty-message p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .ecom-grid {
        grid-template-columns: 1fr;
    }
    
    .ecom-cart-summary {
        max-width: 100%;
    }
}
