/* ─── Order Detail — Premium Light Theme (Red/Orange accent) ─── */

/* Fix SweetAlert buttons hidden by global CSS reset */
.swal2-confirm.swal2-styled,
.swal2-cancel.swal2-styled {
    background-image: none !important;
    color: #fff !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.swal2-confirm.swal2-styled {
    background-color: #ff5722 !important;
}
.swal2-cancel.swal2-styled {
    background-color: #999 !important;
}

.od-wrap { max-width:1100px; margin:0 auto; padding:20px 16px 40px; }
.od-breadcrumb { display:flex; align-items:center; gap:6px; font-size:13px; color:#888; margin-bottom:18px; flex-wrap:wrap; }
.od-breadcrumb a { color:#ff5722; text-decoration:none; font-weight:500; transition:color .2s; }
.od-breadcrumb a:hover { color:#e64a19; text-decoration:underline; }
.od-breadcrumb i { font-size:10px; color:#bbb; }

/* Main Layout */
.od-main { display:grid; grid-template-columns:1fr 1fr; gap:28px; align-items:start; }

/* Gallery */
.od-gallery { position:relative; }
.od-hero-wrap { position:relative; width:100%; aspect-ratio:4/3; border-radius:16px; overflow:hidden; background:#f5f5f5; border:1px solid #e8e8e8; cursor:zoom-in; }
.od-hero-img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .4s ease; }
.od-hero-wrap:hover .od-hero-img { transform:scale(1.03); }
.od-hero-badge { position:absolute; top:12px; left:12px; background:rgba(255,87,34,.92); backdrop-filter:blur(6px); color:#fff; font-size:11px; font-weight:700; padding:5px 12px; border-radius:8px; display:flex; align-items:center; gap:4px; }
.od-hero-badge i { font-size:13px; }

.od-thumbs { display:flex; gap:8px; margin-top:10px; overflow-x:auto; padding-bottom:4px; }
.od-thumbs::-webkit-scrollbar { height:4px; }
.od-thumbs::-webkit-scrollbar-thumb { background:#ddd; border-radius:4px; }
.od-thumb { width:72px; height:54px; border-radius:10px; overflow:hidden; border:2px solid transparent; cursor:pointer; flex-shrink:0; transition:all .2s; opacity:.7; }
.od-thumb:hover, .od-thumb.active { border-color:#ff5722; opacity:1; box-shadow:0 2px 8px rgba(255,87,34,.2); }
.od-thumb img { width:100%; height:100%; object-fit:cover; }

/* Lightbox */
.od-lightbox { display:none; position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,.88); backdrop-filter:blur(8px); align-items:center; justify-content:center; }
.od-lightbox.show { display:flex; }
.od-lightbox-close { position:absolute; top:20px; right:24px; font-size:32px; color:#fff; cursor:pointer; background:none; border:none; z-index:10; opacity:.7; transition:opacity .2s; }
.od-lightbox-close:hover { opacity:1; }
.od-lightbox img { max-width:90vw; max-height:85vh; object-fit:contain; border-radius:12px; box-shadow:0 8px 40px rgba(0,0,0,.4); }
.od-lightbox-nav { position:absolute; top:50%; transform:translateY(-50%); font-size:36px; color:#fff; background:rgba(255,255,255,.12); border:none; cursor:pointer; width:50px; height:50px; border-radius:50%; display:flex; align-items:center; justify-content:center; transition:background .2s; }
.od-lightbox-nav:hover { background:rgba(255,255,255,.25); }
.od-lightbox-prev { left:20px; }
.od-lightbox-next { right:20px; }

/* Product Info */
.od-info { display:flex; flex-direction:column; gap:16px; }
.od-cat-tag { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; color:#ff5722; background:rgba(255,87,34,.08); padding:5px 14px; border-radius:20px; width:fit-content; }
.od-cat-tag i { font-size:14px; }
.od-title { font-size:22px; font-weight:700; color:#1a1a1a; line-height:1.35; margin:0; }
.od-id { font-size:13px; color:#999; font-weight:500; }

.od-price-box { background:linear-gradient(135deg,#fff5f0,#fff0eb); border:1px solid #fdd; border-radius:14px; padding:18px 22px; display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.od-price { font-size:28px; font-weight:800; color:#e53935; letter-spacing:-.5px; }
.od-price-old { font-size:15px; color:#bbb; text-decoration:line-through; font-weight:500; }
.od-price-discount { font-size:11px; font-weight:700; color:#fff; background:linear-gradient(135deg,#e53935,#ff5252); padding:3px 10px; border-radius:6px; }

/* Detail Card */
.od-detail-card { background:#fff; border:1px solid #e8e8e8; border-radius:14px; padding:20px; }
.od-detail-card h4 { font-size:14px; font-weight:700; color:#333; margin:0 0 14px; display:flex; align-items:center; gap:6px; }
.od-detail-card h4 i { color:#ff5722; font-size:16px; }
.od-detail-list { list-style:none; margin:0; padding:0; }
.od-detail-list li { padding:8px 0; border-bottom:1px solid #f5f5f5; font-size:13px; color:#555; display:flex; align-items:center; gap:8px; line-height:1.5; }
.od-detail-list li:last-child { border-bottom:none; }
.od-detail-list li i { color:#ff5722; font-size:14px; flex-shrink:0; }
.od-detail-text { font-size:13px; color:#555; line-height:1.7; white-space:pre-line; }

/* Purchase Section */
.od-purchase { background:#fff; border:1px solid #e8e8e8; border-radius:14px; padding:20px; }
.od-purchase h4 { font-size:14px; font-weight:700; color:#333; margin:0 0 14px; display:flex; align-items:center; gap:6px; }
.od-purchase h4 i { color:#ff5722; font-size:16px; }
.od-voucher-row { display:flex; gap:8px; margin-bottom:14px; }
.od-voucher-input { flex:1; padding:10px 14px; border:1px solid #ddd; border-radius:10px; font-size:13px; background:#fafafa; color:#333; transition:border-color .2s; }
.od-voucher-input:focus { outline:none; border-color:#ff5722; background:#fff; }
.od-voucher-input::placeholder { color:#bbb; }
.od-buy-btn { width:100%; padding:14px; border:none; border-radius:12px; font-size:15px; font-weight:700; color:#fff; background:linear-gradient(135deg,#ff5722,#ff7043); cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; transition:all .25s; position:relative; overflow:hidden; box-shadow:0 4px 14px rgba(255,87,34,.25); }
.od-buy-btn:hover { background:linear-gradient(135deg,#e64a19,#ff5722); transform:translateY(-2px); box-shadow:0 6px 20px rgba(255,87,34,.4); }
.od-buy-btn:active { transform:translateY(0); }
.od-buy-btn.loading { pointer-events:none; opacity:.7; }
.od-buy-btn i { font-size:18px; }
.od-login-hint { text-align:center; font-size:13px; color:#888; margin-top:10px; }
.od-login-hint a { color:#ff5722; font-weight:600; text-decoration:none; }
.od-login-hint a:hover { text-decoration:underline; }
.od-result { margin-top:12px; }

/* Status Tags */
.od-status { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; padding:4px 12px; border-radius:8px; }
.od-status.available { color:#43a047; background:rgba(67,160,71,.1); }
.od-status.sold { color:#e53935; background:rgba(229,57,53,.1); }

/* Similar Section */
.od-similar { margin-top:36px; }
.od-similar h3 { font-size:17px; font-weight:700; color:#1a1a1a; margin:0 0 16px; display:flex; align-items:center; gap:8px; }
.od-similar h3 i { color:#ff5722; }
.od-similar-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px; }
.od-sim-card { background:#fff; border:1px solid #e8e8e8; border-radius:12px; overflow:hidden; transition:all .25s; }
.od-sim-card:hover { border-color:#ff5722; transform:translateY(-3px); box-shadow:0 6px 18px rgba(0,0,0,.08); }
.od-sim-card a { text-decoration:none; color:inherit; display:block; }
.od-sim-img { width:100%; height:130px; object-fit:cover; display:block; }
.od-sim-body { padding:10px 12px; }
.od-sim-price { font-size:15px; font-weight:700; color:#e53935; }
.od-sim-old { font-size:11px; color:#aaa; text-decoration:line-through; margin-left:6px; }
.od-sim-id { font-size:11px; color:#999; margin-top:4px; }

/* ─── Mobile Purchase Bottom Bar ─── */
.od-mobile-bar { display:none; }

@media(max-width:768px) {
    .od-main { grid-template-columns:1fr; gap:18px; }
    .od-hero-wrap { aspect-ratio:16/10; }
    .od-title { font-size:18px; }
    .od-price { font-size:24px; }
    .od-price-box { padding:14px 16px; }
    .od-similar-grid { grid-template-columns:repeat(2,1fr); }
    .od-sim-img { height:100px; }

    /* Mobile sticky buy bar */
    .od-mobile-bar { display:flex; position:fixed; bottom:0; left:0; right:0; z-index:999; background:#fff; border-top:1px solid #eee; padding:10px 16px; gap:12px; align-items:center; box-shadow:0 -4px 20px rgba(0,0,0,.08); }
    .od-mobile-price { font-size:18px; font-weight:800; color:#e53935; white-space:nowrap; }
    .od-mobile-price small { display:block; font-size:11px; color:#aaa; text-decoration:line-through; font-weight:400; }
    .od-mobile-buy { flex:1; padding:12px; border:none; border-radius:10px; font-size:14px; font-weight:700; color:#fff; background:linear-gradient(135deg,#ff5722,#ff7043); cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; box-shadow:0 3px 12px rgba(255,87,34,.3); }
    .od-mobile-buy i { font-size:16px; }

    /* Add bottom padding for fixed bar */
    .od-wrap { padding-bottom:80px; }

    /* Hide desktop purchase on mobile */
    .od-purchase .od-buy-btn { display:none; }
}

@media(max-width:480px) {
    .od-wrap { padding:12px 10px 90px; }
    .od-thumb { width:56px; height:42px; }
    .od-similar-grid { gap:8px; }
    .od-mobile-bar { padding:8px 12px; }
    .od-mobile-price { font-size:16px; }
    .od-mobile-buy { padding:10px; font-size:13px; }
}
