/* ===========================
   DEEPAKRAJTech Store
=========================== */
/* ===========================
   Global & Font Family
=========================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}

.container {
    margin: 0 auto;
    padding: 0 25px;
}

.store-header {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
}

.store-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.store-header p {
    max-width: 700px;
    margin: auto;
    opacity: 0.95;
    font-size: 1.1rem;
}

/* ===========================
   Filter
=========================== */

.store-filter {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.filter-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-wrapper input,
.filter-wrapper select {
    flex: 1;
    min-width: 220px;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #f9fafb;
}

.filter-wrapper input:focus,
.filter-wrapper select:focus {
    border-color: #16a34a;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* ===========================
   Product Info
=========================== */

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 35px 0 25px;
}

.product-info h2 {
    font-size: 1.6rem;
    color: #111827;
}

#productCount {
    color: #6b7280;
    font-weight: 500;
    background: #f3f4f6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
}

/* ===========================
   Grid (Updated for Max 4 Cards)
=========================== */

.product-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 60px;
    /* Default - Mobile Devices */
    grid-template-columns: 1fr;
}

/* ===========================
   Premium Card Design
=========================== */

.product-card {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.product-card img {
    width: 100%;
    aspect-ratio: 4/3;
    /* Aap chahein toh ise 16/9 ya 1/1 bhi karke test kar sakte hain */
    object-fit: cover;
    /* 'contain' ki jagah 'cover' karna hai */
    background: #f3f4f6;
    /* padding: 15px;  <-- Is line ko hata dena hai */
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.05);
    /* Hover par image zoom effect */
}

.product-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #fafafa;
    border-top: 1px solid #f3f4f6;
}

/* ===========================
   Badges
=========================== */

.featured {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    align-self: flex-start;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.condition {
    display: inline-block;
    background: #ecfdf5;
    color: #059669;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    align-self: flex-start;
    border: 1px solid #a7f3d0;
}

/* ===========================
   Title
=========================== */

.product-body h3 {
    margin: 8px 0 12px;
    font-size: 1.15rem;
    color: #111827;
    font-weight: 700;
    line-height: 1.4;
}

/* ===========================
   Specs
=========================== */

.spec-list {
    margin: 10px 0 20px;
    padding-left: 20px;
    color: #4b5563;
    font-size: 14px;
    flex-grow: 1;
    /* Pushes everything below it to the bottom */
}

.spec-list li {
    margin-bottom: 6px;
    position: relative;
}

/* ===========================
   Price
=========================== */

.price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
    padding-top: 15px;
    border-top: 1px dashed #e5e7eb;
}

.offer {
    color: #dc2626;
    font-size: 24px;
    font-weight: 800;
}

.mrp {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 15px;
}

/* ===========================
   Stock
=========================== */

.stock {
    margin-bottom: 20px;
    font-size: 14px;
}

.in-stock {
    color: #16a34a;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.out-stock {
    color: #dc2626;
    font-weight: 700;
}

/* ===========================
   Button
=========================== */

.buy-btn {
    width: 100%;
    border: none;
    padding: 14px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.2);
}

.buy-btn:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    box-shadow: 0 6px 10px -1px rgba(22, 163, 74, 0.4);
    transform: translateY(-2px);
}

.buy-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ===========================
   Loading & Error
=========================== */

.loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #4b5563;
    font-weight: 500;
}

.error {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #dc2626;
    grid-column: 1 / -1;
}

/* ===========================
   Empty
=========================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state h2 {
    color: #111827;
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

/* Modal Background */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

/* ===========================
   Footer
=========================== */

.store-footer {
    background: #111827;
    color: #9ca3af;
    text-align: center;
    padding: 30px 20px;
    font-size: 14px;
}

/* ===========================
   Responsive Queries (Setting Column Counts)
=========================== */

/* Tablets */
@media(min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Desktops / Large Tablets */
@media(min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Screens (Max 4 Laptops) */
@media(min-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Adjustments */
@media(max-width: 768px) {
    .store-header {
        padding: 45px 20px;
    }

    .store-header h1 {
        font-size: 1.8rem;
    }

    .product-info {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .filter-wrapper {
        flex-direction: column;
    }
}