/* =========================================================
   PAAM HEALTH SHOP - FINAL CONSOLIDATED CSS
   ========================================================= */

[v-cloak] { display: none; }

/* --- INTERACTIVE CURSORS --- */
.img-wrapper, .remove-icon, .btn-primary-shop, .cart-btn-nav,
.f-btn, .breadcrumb, .shop-card, .detail-view-container, 
.close-x-btn, .social-icon, .catalog-btn {
    cursor: pointer;
}

/* --- SEARCH BAR --- */
.search-wrapper { position: relative; flex: 0 1 400px; margin: 0 20px; }
.search-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--accent); }
.search-wrapper input {
    width: 100%; padding: 10px 15px 10px 45px; border-radius: 25px;
    border: 1px solid #666; background: #2a2a2a; color: white; outline: none; transition: 0.3s;
}
.cart-btn-nav { background: var(--accent); color: var(--primary); border: none; padding: 10px 20px; border-radius: 30px; font-weight: 800; }

/* --- PRODUCT GRID --- */
.shop-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 30px; 
}

/* --- PRODUCT CARDS & STOCK-OUT --- */
.shop-card {
    background: #fff; border-radius: 15px; padding: 20px; transition: 0.3s;
    position: relative; border: 1px solid #eee; display: flex; flex-direction: column;
}
.shop-card:hover { transform: translateY(-10px); box-shadow: var(--shadow); }

.stock-out-badge {
    position: absolute; top: 15px; left: 15px; background: #444; color: #fff;
    padding: 5px 12px; font-size: 0.75rem; font-weight: 900; border-radius: 4px; z-index: 5;
}
.stock-out-card .prod-img { filter: grayscale(1); opacity: 0.6; }

.discount-badge {
    position: absolute; top: 15px; right: 15px; background: #ff4444; color: #fff;
    padding: 5px 10px; border-radius: 5px; font-weight: 800; font-size: 0.8rem; z-index: 5;
}

.img-wrapper { height: 200px; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.prod-img { max-height: 100%; max-width: 100%; object-fit: contain; }

/* --- NEW MODEL TAG STYLING (Centered & Highlighted) --- */
.model-wrapper {
    display: flex; justify-content: center; width: 100%; margin-bottom: 8px;
}
.model-tag { 
    background: var(--accent); 
    color: var(--primary); 
    font-size: 0.75rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    padding: 4px 12px; 
    border-radius: 12px;
    text-align: center;
}

.shop-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--primary); text-align: center; }
.shop-caption { font-size: 0.85rem; color: #666; margin-bottom: 15px; line-height: 1.4; height: 3em; overflow: hidden; text-align: center; }

/* --- NEW PRICE LAYOUT (Discount Left, Old Right) --- */
.price-container { 
    display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-bottom: 15px; 
}
.new-price { color: var(--primary); font-weight: 900; font-size: 1.25rem; }
.old-price { text-decoration: line-through; color: #bbb; font-size: 0.9rem; }

.btn-primary-shop {
    width: 100%; padding: 12px; border-radius: 8px; border: 2px solid var(--primary);
    background: var(--primary); color: var(--accent); font-weight: 800; transition: 0.3s;
}
.btn-primary-shop:hover:not(:disabled) { background: var(--accent); color: var(--primary); }
.btn-primary-shop:disabled { background: #ccc; border-color: #bbb; color: #666; cursor: not-allowed; }

/* --- PRODUCT DETAIL VIEW --- */
.detail-view-container {
    position: fixed; inset: 0; background: #fff; z-index: 4000; overflow-y: auto; padding: 40px 0;
}
.product-page-layout {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; position: relative;
}

.main-view-img { width: 100%; height: 500px; object-fit: contain; background: #f9f9f9; border-radius: 20px; }

/* Detail Typography */
.detail-model-wrapper { display: flex; justify-content: flex-start; margin-bottom: 10px; }
.detail-model-label { 
    background: var(--accent); color: var(--primary); padding: 5px 15px; 
    border-radius: 20px; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
}
.detail-price-box { margin: 20px 0; display: flex; align-items: baseline; gap: 20px; }
.detail-current-price { font-size: 2.5rem; font-weight: 900; color: var(--primary); }
.detail-old-price { text-decoration: line-through; color: #ccc; font-size: 1.4rem; }

.info-section { margin: 30px 0; border-top: 1px solid #eee; padding-top: 20px; }
.info-section h4 { margin-bottom: 15px; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }

/* --- FIXED DOUBLE GAPS IN SPECS --- */
.details-text { 
    line-height: 1.6; 
    color: #444; 
    white-space: pre-line; /* Collapses the massive gaps created by database line breaks */
    margin-top: 5px;
}

/* Action Buttons */
.action-grid { display: flex; gap: 15px; margin-top: 30px; align-items: center; }

.buy-now-btn {
    padding: 18px 40px; background: var(--primary); color: var(--accent);
    border: none; border-radius: 35px; font-weight: 800; font-size: 1.1rem; transition: 0.3s;
}
.buy-now-btn:hover:not(:disabled) { background: var(--accent); color: var(--primary); transform: scale(1.05); }
.buy-now-btn:disabled { background: #ccc; color: #666; cursor: not-allowed; }

/* V1 Restored Catalogue Button */
.catalog-btn {
    display: flex; align-items: center; gap: 10px; padding: 15px 25px;
    background: #fff; color: var(--primary); border: 2px solid var(--accent);
    border-radius: 35px; font-weight: 800; text-decoration: none; transition: 0.3s;
}
.catalog-btn:hover { background: var(--accent); color: var(--primary); }

/* --- FLOATING & CLOSE CONTROLS (V1 GOLD STYLE) --- */
.floating-controls { position: fixed; left: 20px; top: 100px; display: flex; flex-direction: column; gap: 12px; z-index: 3000; }

.f-btn, .close-x-btn {
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--accent); color: var(--primary);
    border: none; display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; box-shadow: var(--shadow); transition: 0.3s;
}
.f-btn:hover, .close-x-btn:hover { background: var(--primary); color: var(--accent); transform: scale(1.1); }

/* Absolute position for X inside detail view */
.close-x-btn { position: absolute; top: -10px; right: 0; z-index: 100; }

/* --- CART PANEL --- */
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 5000; }
.cart-panel { 
    position: absolute; right: 0; top: 0; width: 550px; height: 100%; 
    background: #fff; padding: 35px; overflow-y: auto; 
}
.cart-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #eee; padding-bottom: 15px; margin-bottom: 20px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #eee; }
.cart-total { font-size: 1.5rem; font-weight: 800; text-align: right; margin: 20px 0; color: var(--primary); }

.checkout-form { display: flex; flex-direction: column; gap: 12px; }
.checkout-form input, .checkout-form textarea { padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; }
.btn-order { background: var(--primary); color: var(--accent); width: 100%; padding: 15px; border: 2px solid var(--accent); border-radius: 8px; font-weight: 800; margin-top: 15px; cursor: pointer; }
.btn-order:disabled { background: #666; cursor: not-allowed; border-color: #666; }

/* --- AI CHAT SYSTEM --- */
.chat-container { position: fixed; right: 20px; bottom: 80px; z-index: 4000; }
.chat-window { width: 320px; height: 450px; background: white; border-radius: 15px; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; border: 1px solid #eee; }
.chat-header { background: var(--primary); color: var(--accent); padding: 15px; display: flex; justify-content: space-between; font-weight: 800; }
.chat-body { flex: 1; padding: 15px; overflow-y: auto; background: #f9f9f9; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 15px; border-radius: 12px; font-size: 0.9rem; max-width: 85%; line-height: 1.4; }
.msg.ai { background: #fff; align-self: flex-start; border: 1px solid #eee; }
.msg.user { background: var(--accent); align-self: flex-end; font-weight: 600; }
.chat-trigger { width: 60px; height: 60px; background: var(--accent); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: var(--shadow); }

/* --- MARQUEE --- */
.moving-text-container { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--primary); color: var(--accent); padding: 10px 0; z-index: 2500; border-top: 2px solid var(--accent); }
.marquee { white-space: nowrap; animation: marquee 30s linear infinite; font-weight: 700; font-size: 0.9rem; }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .product-page-layout { grid-template-columns: 1fr; gap: 30px; }
    .main-view-img { height: 350px; }
    .cart-panel { width: 100%; }
    .action-grid { flex-direction: column; align-items: stretch; }
}