/* =============================================================
   shop.css — Item Mall
   Ghost's of Lineage II
   ============================================================= */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: url(../images/bg/2.png) top / cover no-repeat;
    background-color: #0a0904;
    background-attachment: fixed;
    min-height: 100vh;
}

.shop-wrapper { max-width: 1100px; margin: 0 auto; padding: 14vh 20px 80px; font-family: 'Roboto', sans-serif; }
.shop-hero { text-align: center; margin-bottom: 30px; }
.shop-hero h1 { color: #f5deb3; font-size: 34px; text-transform: uppercase; letter-spacing: 4px; margin: 0 0 10px; text-shadow: 0 0 20px rgba(245,222,179,0.3); }
.shop-hero p { color: #b0a99a; font-size: 14px; margin: 0; }

/* Category filter */
.shop-cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 26px; }
.shop-cat {
    background: rgba(116,109,85,0.12); border: 1px solid rgba(116,109,85,0.4); color: #cfc7b0;
    padding: 8px 18px; border-radius: 4px; cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; transition: all .2s;
}
.shop-cat.active { background: rgba(116,109,85,0.35); border-color: #f5deb3; color: #f5deb3; }

/* Product grid */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.shop-card {
    background: linear-gradient(160deg, rgba(20,18,12,0.92), rgba(10,9,4,0.96));
    border: 1px solid rgba(116,109,85,0.4); border-radius: 8px; padding: 16px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.shop-icon { position: relative; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.35); border: 1px solid rgba(116,109,85,0.35); border-radius: 6px; }
.shop-icon img { width: 56px; height: 56px; object-fit: contain; }
.shop-icon .ph { display: none; font-size: 26px; color: rgba(176,169,138,0.4); }
.shop-icon.noimg .ph { display: block; }
.shop-icon .ench { position: absolute; bottom: 1px; right: 3px; font-size: 11px; font-weight: bold; color: #ffd24d; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.shop-icon .qty { position: absolute; bottom: 1px; left: 3px; font-size: 11px; font-weight: bold; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.shop-name { color: #fff; font-weight: bold; font-size: 14px; line-height: 1.3; min-height: 36px; display: flex; align-items: center; }
.shop-price { font-size: 16px; font-weight: bold; display: flex; align-items: center; gap: 6px; }
.price-web { color: #f5deb3; }
.price-devote { color: #ff9800; }
.shop-buy {
    width: 100%; margin-top: 6px; background: rgba(116,109,85,0.3); border: 1px solid #f5deb3; color: #f5deb3;
    padding: 9px; border-radius: 4px; cursor: pointer; font-family: 'Roboto'; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; font-weight: bold; transition: all .2s;
}
.shop-buy:hover { background: rgba(245,222,179,0.2); }
.shop-msg { text-align: center; color: #8a8370; font-style: italic; padding: 50px; grid-column: 1/-1; }

/* Modal */
.shop-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 2000; align-items: center; justify-content: center; }
.shop-modal-overlay.active { display: flex; }
.shop-modal { background: linear-gradient(160deg, rgba(25,22,15,0.98), rgba(10,9,4,0.99)); border: 1px solid rgba(245,222,179,0.4); border-radius: 8px; padding: 28px; width: 90%; max-width: 380px; }
.shop-modal h3 { color: #f5deb3; margin: 0 0 6px; }
.shop-modal p { color: #b0a99a; font-size: 13px; margin: 0 0 16px; }
.shop-modal select { width: 100%; background: rgba(10,9,4,0.8); border: 1px solid rgba(116,109,85,0.5); color: #fff; padding: 11px; border-radius: 4px; font-size: 14px; margin-bottom: 16px; }
.shop-modal-actions { display: flex; gap: 10px; }
.shop-modal-actions button { flex: 1; padding: 11px; border-radius: 4px; cursor: pointer; font-weight: bold; text-transform: uppercase; font-size: 12px; letter-spacing: 1px; }
.smb-confirm { background: rgba(116,109,85,0.3); border: 1px solid #f5deb3; color: #f5deb3; }
.smb-cancel { background: transparent; border: 1px solid rgba(116,109,85,0.4); color: #aaa; }

/* ---- Toolbar (cart / history) ---- */
.shop-toolbar { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.shop-tool-btn {
    position: relative; background: rgba(20,18,12,0.7); border: 1px solid rgba(116,109,85,0.45);
    color: #cfc7b0; padding: 9px 18px; border-radius: 6px; cursor: pointer; font-family: 'Roboto'; font-size: 13px; transition: all .2s;
}
.shop-tool-btn:hover { border-color: #f5deb3; color: #f5deb3; }
.cart-badge { position: absolute; top: -8px; right: -8px; background: #ff5722; color: #fff; border-radius: 50%; min-width: 20px; height: 20px; font-size: 11px; font-weight: bold; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* ---- Section titles ---- */
.shop-section-title { color: #f5deb3; text-transform: uppercase; letter-spacing: 2px; font-size: 16px; margin: 0 0 16px; text-align: center; }

/* ---- Sale ---- */
.shop-card.on-sale { border-color: rgba(255,180,0,0.6); box-shadow: 0 0 18px rgba(255,180,0,0.12); }
.sale-star { position: absolute; top: 8px; right: 8px; background: linear-gradient(135deg,#ffb300,#ff7a00); color: #2a1c00; font-size: 10px; font-weight: bold; padding: 3px 8px; border-radius: 4px; letter-spacing: 1px; box-shadow: 0 0 8px rgba(255,160,0,0.5); }
.shop-card { position: relative; }
.old-price { color: #888; text-decoration: line-through; font-size: 13px; margin-right: 4px; }

/* ---- Buy + add-to-cart row ---- */
.shop-actions { display: flex; gap: 8px; width: 100%; margin-top: 6px; }
.shop-actions .shop-buy { flex: 1; margin-top: 0; }
.shop-cart-add { background: rgba(116,109,85,0.3); border: 1px solid #f5deb3; color: #f5deb3; border-radius: 4px; cursor: pointer; padding: 0 12px; font-size: 14px; }
.shop-cart-add:hover { background: rgba(245,222,179,0.2); }

/* ---- Recent feed ---- */
.recent-feed { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px; }
.feed-pill { flex-shrink: 0; display: flex; align-items: center; gap: 7px; background: rgba(20,18,12,0.7); border: 1px solid rgba(116,109,85,0.35); border-radius: 20px; padding: 6px 14px; font-size: 12px; color: #cfc7b0; white-space: nowrap; }
.feed-pill img { width: 20px; height: 20px; object-fit: contain; }
.feed-pill strong { color: #f5deb3; }
.feed-pill small { color: #777; }

/* ---- Cart modal lines ---- */
.cart-lines { max-height: 320px; overflow-y: auto; margin-bottom: 12px; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(116,109,85,0.15); }
.cart-line img { width: 38px; height: 38px; object-fit: contain; background: rgba(0,0,0,0.3); border-radius: 4px; }
.cart-line-info { flex: 1; color: #fff; font-size: 14px; }
.cart-line-info small { color: #8a8370; font-size: 12px; }
.cart-line input { width: 52px; background: rgba(10,9,4,0.8); border: 1px solid rgba(116,109,85,0.5); color: #fff; padding: 6px; border-radius: 4px; text-align: center; }
.cart-rm { background: none; border: none; color: #b04a4a; cursor: pointer; font-size: 15px; }
.cart-rm:hover { color: #f44336; }
.cart-totals { text-align: right; color: #fff; font-weight: bold; font-size: 16px; padding: 10px 0; border-top: 1px solid rgba(116,109,85,0.3); }

/* ---- History table ---- */
.hist-table { width: 100%; border-collapse: collapse; }
.hist-table th { text-align: left; color: #cfc7b0; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 8px; border-bottom: 1px solid rgba(116,109,85,0.3); }
.hist-table td { padding: 9px 8px; font-size: 13px; color: #e1e1e1; border-bottom: 1px solid rgba(116,109,85,0.12); }

/* ---- Toast ---- */
#shopToast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(20,18,12,0.97); border: 1px solid #f5deb3; color: #f5deb3; padding: 12px 22px; border-radius: 6px; font-family: 'Roboto'; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 3000; }
#shopToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
