/* ===== PRODUCT PAGE SPECIFIC STYLES ===== */
#main-content {
    display: block !important;   /* override any external preloader hide */
}

.products-page {
    padding-top: 120px;
    min-height: 100vh;
}

/* Search & Filter Bar */
.products-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 30px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

body.dark .products-controls {
    background: #111;
    border-color: #222;
}

.search-wrapper {
    flex: 1 1 250px;
    position: relative;
}

.search-wrapper input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    transition: 0.3s;
    background: #f9f9f9;
    outline: none;
}

body.dark .search-wrapper input {
    background: #1a1a1a;
    border-color: #333;
    color: #fff;
}

.search-wrapper input:focus {
    border-color: #0d5f18;
    background: #fff;
}

body.dark .search-wrapper input:focus {
    border-color: #f2d335;
    background: #222;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 12px 12px;
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body.dark .suggestions-list {
    background: #1a1a1a;
    border-color: #333;
}

.suggestions-list li {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
    color: #333;
}

body.dark .suggestions-list li {
    color: #ddd;
    border-bottom-color: #222;
}

.suggestions-list li:hover {
    background: #f0f0f0;
}

body.dark .suggestions-list li:hover {
    background: #333;
}

.filter-wrapper {
    flex: 0 0 auto;
}

.filter-wrapper select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    background: #f9f9f9;
    cursor: pointer;
    transition: 0.3s;
    outline: none;
}

body.dark .filter-wrapper select {
    background: #1a1a1a;
    border-color: #333;
    color: #fff;
}

.filter-wrapper select:focus {
    border-color: #0d5f18;
}

body.dark .filter-wrapper select:focus {
    border-color: #f2d335;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.page-btn {
    background: #0d5f18;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    font-family: 'Poppins', sans-serif;
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

body.dark .page-btn:disabled {
    background: #444;
}

.page-info {
    font-weight: 600;
    color: #0b2b26;
}

body.dark .page-info {
    color: #f2d335;
}

/* Product Grid (3 columns on desktop, 1 on mobile) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Product card image container – made rectangular (4:3) */
.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;          /* better for rectangular photos */
    overflow: hidden;
    background: #f5f5f5;
}

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

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

/* Wishlist & discount badge (from main styles, but repeated for clarity) */
.wishlist-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    padding: 7px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wishlist-btn .heart-icon {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #999;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.wishlist-btn:hover { background: #fff; transform: scale(1.1); }
.wishlist-btn.active { background: #0d5f18; }
.wishlist-btn.active .heart-icon { fill: #fff; stroke: #fff; }

.discount-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #f2d335;
    color: #000;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Price display */
.product-price {
    margin-bottom: 5px;
    font-family: 'Cinzel', serif;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.95rem;
    margin-right: 8px;
}

body.dark .original-price { color: #777; }

.discounted-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d5f18;
}

body.dark .discounted-price { color: #4caf50; }

/* Description toggle & content – same as main styles but added here if needed */
.product-description-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid #eee;
    cursor: pointer;
    user-select: none;
}

body.dark .product-description-toggle { border-top-color: #222; }

.desc-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.desc-arrow {
    font-size: 0.7rem;
    color: #888;
    transition: transform 0.3s ease;
}

.product-description-toggle.active .desc-arrow { transform: rotate(180deg); }

.product-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.product-description.show {
    max-height: 200px;
    padding-top: 10px;
}

.product-description p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
}

body.dark .product-description p { color: #aaa; }

/* Calculator Section */
.calculator-section {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    margin-top: 40px;
}

body.dark .calculator-section {
    background: #111;
    border-color: #222;
}

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

@media (max-width: 600px) {
    .calculator-form { grid-template-columns: 1fr; }
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.calc-input-group label {
    font-weight: 600;
    color: #0b2b26;
    font-size: 0.9rem;
}

body.dark .calc-input-group label { color: #f2d335; }

.calc-input-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    transition: 0.3s;
    outline: none;
}

body.dark .calc-input-group input {
    background: #1a1a1a;
    border-color: #333;
    color: #fff;
}

.calc-input-group input:focus {
    border-color: #0d5f18;
    box-shadow: 0 0 0 3px rgba(13,95,24,0.1);
}

body.dark .calc-input-group input:focus {
    border-color: #f2d335;
}

.calc-disclaimer {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: #888;
    margin: 5px 0 0;
    text-align: center;
}

body.dark .calc-disclaimer { color: #aaa; }

.calc-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-calculate {
    background: #0d5f18;
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Poppins', sans-serif;
}

.btn-calculate:hover { background: #0a4a13; transform: translateY(-2px); }

.recommendation-result {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    display: none;
    border: 2px solid #0d5f18;
    text-align: center;
}

body.dark .recommendation-result {
    background: #1a1a1a;
    border-color: #f2d335;
}

.recommendation-result img {
    max-width: 200px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.recommendation-result h4 {
    color: #0d5f18;
    font-family: 'Cinzel', serif;
    margin-bottom: 10px;
}

body.dark .recommendation-result h4 { color: #f2d335; }

.buy-btn,
.whatsapp-btn {
    display: inline-block;
    margin: 10px 5px;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.buy-btn {
    background: #f2d335;
    color: #0b2b26;
}

.buy-btn:hover { background: #e5c700; transform: translateY(-2px); }

.whatsapp-btn {
    background: #25D366;
    color: white;
}

.whatsapp-btn:hover { background: #1ebe57; transform: translateY(-2px); }