/* =====================================================
   1. GLOBAL / ROOT VARIABLES
   Color System + Base Theme
===================================================== */

.gwsw-shop{
  --bg:#000000;
  --panel:#1D1D1D;
  --muted:#DADADA;
  --text:#F4F4F4;
  --brand:#ED1C24;
  --line:#2B2B2B;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;

  margin:0;
  width:100%;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:var(--bg);
}


/* =====================================================
   2. GLOBAL RESET / BOX SIZING
===================================================== */

.gwsw-shop,
.gwsw-shop *,
.gwsw-shop *::before,
.gwsw-shop *::after{
  box-sizing:border-box;
}

/* =====================================================
   3. TOP BAR / HEADER
===================================================== */

.gwsw-shop .topbar{
  background:var(--bg);
  color:#fff;
  padding:12px 16px;
  position:sticky;
  top:0;
  z-index:50;
}

.gwsw-shop .topbar-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.gwsw-shop .logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  cursor:pointer;
}

.gwsw-shop .logo-badge{
  width:28px;
  height:28px;
  border-radius:8px;
  background:linear-gradient(135deg, var(--brand), #ffd36b);
}

.gwsw-shop .pill{
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  color:#fff;
}

/* =====================================================
   4. PAGE WRAPPER
===================================================== */

.gwsw-shop .wrap{
  max-width:1200px;
  margin:0 auto;
  padding:18px 16px 40px;
}

/* =====================================================
   5. PRODUCT LIST (SHOP PAGE)
===================================================== */

.gwsw-shop .grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, 260px);
  gap:18px;
  justify-content:center;
}

.gwsw-shop .card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;

  display:flex;
  flex-direction:column;
  height:100%;               
}

.gwsw-shop .card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.gwsw-shop .thumb img{
  width:100%;
  height:auto;
  display:block;
}

.gwsw-shop .card-body{
  padding:12px;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  flex:1;
}

.gwsw-shop .card-title{
  font-weight:900;
  font-size:18px;
  margin:6px 0 12px;
  text-align:center;
  letter-spacing:.3px;
}

.gwsw-shop .price{
  font-size:18px;
  font-weight:900;
  margin-top:auto; 
}

/* =====================================================
   6. PRODUCT DETAIL PAGE
===================================================== */

.gwsw-shop .product{
  display:none;
}

.gwsw-shop .product.active{
  display:block;
}

.gwsw-shop .product-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:start;
}

@media (max-width:900px){
  .gwsw-shop .product-grid{ 
    grid-template-columns:1fr; 
  }
}

.gwsw-shop .panel{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

.gwsw-shop .panel-pad{ 
  padding:14px; 
}

.gwsw-shop .gallery{ 
  padding:6px; 
}

.gwsw-shop .main-img{
  width:100%;
  aspect-ratio:auto;
  border-radius:12px;
  overflow:hidden;
  background:var(--panel);
  border:1px solid var(--line);
}

.gwsw-shop .main-img img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:var(--panel);
}

.gwsw-shop .product-right{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.gwsw-shop .p-title{
  margin:0 0 6px;
  font-size:22px;
  font-weight:950;
}

.gwsw-shop .p-short{
  color:var(--muted);
  margin:0 0 14px;
}

.gwsw-shop .section-title{
  margin:0;
  font-size:14px;
  font-weight:900;
}

.gwsw-shop .p-long{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.55;
}

.gwsw-shop .divider{
  height:1px;
  background:var(--line);
  margin:14px 0;
}

/* =====================================================
   7. FORM ELEMENTS
===================================================== */

.gwsw-shop .row{
  display:flex;
  gap:10px;
  align-items:center;
}

.gwsw-shop .field-group{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.gwsw-shop label{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
}

.gwsw-shop select{
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  font-size:14px;
  min-width:220px;
}

.gwsw-shop input, 
.gwsw-shop select{
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  font-size:14px;
}

/* EFFECTIVE DATE DROPDOWN SIZE */
.gwsw-shop #effectiveDate{
  width:auto;
  min-width:180px;
  max-width:220px;
}

/* =====================================================
   8. PRODUCT BUY BOX
===================================================== */

.gwsw-shop .buybox{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.gwsw-shop .buy-price{
  font-size:26px;
  font-weight:950;
  text-align:center;
  width:100%;
  margin-bottom:6px;
}

.gwsw-shop .stock{
  font-size:13px;
  color:#007600;
  font-weight:800;
}

/* =====================================================
   9. BUTTON SYSTEM
===================================================== */

.gwsw-shop .btn{
  border:0;
  border-radius:14px;
  padding:11px 12px;
  font-weight:900;
  cursor:pointer;
}

.gwsw-shop .btn.primary{
  background:var(--brand);
  color:#F4F4F4;
}

.gwsw-shop .btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

.gwsw-shop .link-btn{
  border:0;
  background:none;
  color:var(--brand);
  cursor:pointer;
  font-weight:800;
}

/* =====================================================
   10. CART COMPONENTS
===================================================== */

.gwsw-shop .cart-image {
  width: 100px;
  height: 75px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.gwsw-shop .cart-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--panel);
}

.gwsw-shop .cart-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.gwsw-shop .cart-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gwsw-shop .cart-name {
  font-weight: 900;
  font-size: 14px;
}

.gwsw-shop .cart-benefit {
  font-size: 13px;
  color: var(--muted);
}

.gwsw-shop .cart-price {
  font-weight: 900;
  font-size: 16px;
  text-align: right;
}

.gwsw-shop .cart-summary {
  margin-top: 20px;
}

.gwsw-shop .summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 15px;
}

.gwsw-shop .summary-divider {
  height: 1px;
  background: var(--line);
  margin: 10px 0;
}

.gwsw-shop .total-row {
  font-weight: 900;
  font-size: 18px;
}

.gwsw-shop #cartDiscount {
  color: #007600;
  font-weight: 800;
}

.gwsw-shop .remove-btn {
  background: none;
  border: none;
  color: #c40000;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 6px;
}

.gwsw-shop .remove-btn:hover {
  text-decoration: underline;
}

/* =====================================================
   11. CHECKOUT FORM
===================================================== */

.gwsw-shop .checkout-grid {
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:16px;
}

.gwsw-shop .dependent-card {
  border:1px solid var(--line);
  border-radius:12px;
  padding:16px;
  margin-bottom:16px;
}

/* =====================================================
   12. TERMS / LEGAL SECTION
===================================================== */

.gwsw-shop .terms-label {
  font-weight: 600;
}

.gwsw-shop .terms-label a {
  color: var(--brand);
  font-weight: 700;
}

.gwsw-shop .terms-error {
  color: #c40000;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

/* =====================================================
   13. PAYMENT PAGE ORDER SUMMARY
===================================================== */

.gwsw-shop .payment-summary-row {
  display: grid;
  grid-template-columns: 80px 1.5fr 1fr 120px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.gwsw-shop .payment-summary-image {
  width: 70px;
  height: 55px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fafafa;
}

.payment-summary-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.gwsw-shop .payment-summary-name {
  font-weight: 900;
  font-size: 14px;
}

.gwsw-shop .payment-summary-benefit {
  font-size: 13px;
  color: var(--muted);
}

.gwsw-shop .payment-summary-price {
  text-align: right;
  font-weight: 900;
  font-size: 15px;
}

#pdfViewer canvas {
  display: block;
  margin: 0 auto 20px auto;
}

.gwsw-shop #pdfViewer {
  width: 100%;
}

/* =====================================================
   14. PAYMENT PROCESSING SPINNER
===================================================== */

.gwsw-shop .spinner {
  width: 16px;
  height: 16px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top: 3px solid #111;
  border-radius: 50%;
  display: inline-block;
  margin-left: 10px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================================================
   15. GLOBAL UI MESSAGE SYSTEM
   Used for success/error banners across all pages
===================================================== */

.gwsw-shop .ui-message {
  display: none;
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow);
}

.gwsw-shop .ui-message.error {
  background: #ffe5e5;
  color: #b10000;
  border: 1px solid #ffb3b3;
}

.gwsw-shop .ui-message.success {
  background: #e6f6ea;
  color: #0a6b2c;
  border: 1px solid #b7e4c7;
}

.gwsw-shop .ui-message.show {
  display: block;
}

/* =====================================================
   16. FORM FIELD VALIDATION
   Used by JS validation logic
===================================================== */

.gwsw-shop .field-error {
  border: 2px solid #c40000 !important;
  background-color: #fff5f5;
}

.gwsw-shop .field-error-message {
  color: #c40000;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.gwsw-shop .field-group.error label {
  color: #c40000;
}

/* =====================================================
   17. PRODUCT FEATURE BULLET LIST
===================================================== */

.gwsw-shop .product-features {
  display: inline-block;
  text-align: left;
  list-style-position: outside;
  margin: 10px auto 12px auto;
  padding-left: 18px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.45;
}

.gwsw-shop .product-features li {
  margin-bottom: 6px;
}

/* =====================================================
   18. CART TABLE (AMAZON / INSPIRED LAYOUT)
===================================================== */

.gwsw-shop .cart-table{
  background:var(--panel);
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--line);
}

/* Header + rows share same grid */

.gwsw-shop .cart-table .cart-header,
.gwsw-shop .cart-table .cart-row{
  display:grid;
  grid-template-columns: 80px 1fr 1fr 120px 80px;
  column-gap:12px;
  align-items:center;
  justify-items:center;
  text-align:center;
}

.gwsw-shop .cart-table .cart-header{
  background:var(--brand);
  color:#F4F4F4;
  font-weight:900;
  font-size:14px;
  padding:12px 16px;
}

.gwsw-shop .cart-table .cart-header > div{
  display:block;
  width:100%;
  text-align:center;
}

.gwsw-shop .cart-table .cart-row{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
}

.gwsw-shop .cart-table .cart-row:last-child{
  border-bottom:none;
}

.gwsw-shop .cart-table .cart-image{
  width:80px;
  height:60px;
  border-radius:8px;
  border:1px solid var(--line);
  overflow:hidden;
  background:var(--panel);
}

.gwsw-shop .cart-table .cart-image img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:var(--panel);
}

.gwsw-shop .cart-table .cart-name{
  font-weight:900;
  font-size:15px;
  text-align:center;
}

.gwsw-shop .cart-table .cart-benefit{
  font-weight:900;
  font-size:15px;
  color:var(--text);
  text-align:center;
}

.gwsw-shop .cart-table .cart-price{
  font-weight:900;
  font-size:16px;
  text-align:center;
  justify-self:center;
}

.gwsw-shop .cart-table .remove-btn{
  margin:0;
  font-size:12px;
  justify-self:center;
}

.gwsw-shop .cart-empty{
  width:100%;
  text-align:center;
  font-size:20px;
  font-weight:600;
  padding:40px 0;
  color:var(--text);
}

/* =====================================================
   19. MOBILE RESPONSIVE DESIGN
===================================================== */

@media (max-width:768px){

/* GENERAL SPACING */

.gwsw-shop .wrap{
  padding:14px 12px 30px;
}

/* CART BUTTON */

#cartBtn{
  padding:10px 14px;
  font-size:14px;
}

/* PRODUCT GRID */

.gwsw-shop .grid{
  grid-template-columns:1fr;
  gap:14px;
  justify-items:center;
}

.gwsw-shop .card{
  width:60%;
  max-width:340px;
}

.gwsw-shop .thumb img{
  max-height:140px;
  object-fit:contain;
}

.gwsw-shop .card-body{
  padding:10px;
}

/* PRODUCT CARD */

.gwsw-shop .card-title{
  font-size:20px;
}

.gwsw-shop .product-features{
  font-size:16px;
}

.gwsw-shop .price{
  font-size:20px;
}

/* PRODUCT PAGE */

.gwsw-shop .product-grid{
  grid-template-columns:1fr;
  gap:16px;
}

/* BUY BOX */

.gwsw-shop .buy-price{
  font-size:28px;
}

.gwsw-shop .btn{
  padding:14px 16px;
  font-size:16px;
}

/* CART MOBILE */

.gwsw-shop .cart-table .cart-header{
  display:none;
}

.gwsw-shop .cart-table .cart-row{
  grid-template-columns:1.6fr 1fr .8fr auto;
  align-items:center;
  column-gap:8px;
  width:100%;
}

.gwsw-shop .cart-table .cart-row .cart-image{
  display:none;
}

.gwsw-shop .cart-table .cart-image{
  display:none;
}

.gwsw-shop .cart-table .cart-name{
  font-size:17px;
  text-align:left;
}

.gwsw-shop .cart-table .cart-benefit{
  font-size:15px;
  text-align:left;
}

.gwsw-shop .cart-table .cart-price{
  font-size:18px;
  text-align:left;
}

.gwsw-shop .cart-table .remove-btn{
  text-align:left;
  font-size:14px;
}

/* CHECKOUT FORM */

.gwsw-shop .checkout-grid{
  grid-template-columns:1fr;
  gap:12px;
}

.gwsw-shop input,
.gwsw-shop select{
  font-size:16px;
  padding:12px;
}

/* PAYMENT SUMMARY */

.gwsw-shop .payment-summary-row{
  grid-template-columns:1fr;
  gap:6px;
  text-align:left;
}

.gwsw-shop .payment-summary-image{
  width:100%;
  height:auto;
  max-height:100px;
}

.gwsw-shop .payment-summary-price{
  text-align:left;
  font-size:17px;
}

/* =====================================================
   MOBILE CART LAYOUT FIX
===================================================== */

/* stack promo + totals vertically instead of side-by-side */

.gwsw-shop .panel-pad > div{
  flex-direction:column;
  align-items:stretch;
}

/* promo input full width */

.gwsw-shop #promoInput{
  width:100%;
}

/* promo button full width */

.gwsw-shop #applyPromoBtn{
  width:100%;
}

/* totals container full width */

.gwsw-shop .cart-summary{
  width:100%;
}

/* totals rows */

.gwsw-shop .summary-row{
  display:flex;
  justify-content:space-between;
  width:100%;
}

/* checkout button full width */

.gwsw-shop #checkoutBtn{
  width:100%;
  padding:16px;
  font-size:18px;
}

/* MOBILE ONLY HIDES */

.gwsw-shop #pdfViewer{
  display:none;
}

.gwsw-shop .cart-table .cart-image{
  display:none;
}

.gwsw-shop .product > .link-btn{
  position:absolute;
  top:12px;
  left:12px;
}

.gwsw-shop #cartBtn{
  position:absolute;
  top:12px;
  right:12px;
}

.gwsw-shop .wrap{
  padding-top:50px;
}

/* =====================================================
   MOBILE CART TOTALS FIX
===================================================== */

.gwsw-shop .cart-summary{
  width:100%;
  max-width:100%;
}

.gwsw-shop .summary-row{
  display:flex;
  justify-content:space-between;
  width:100%;
  font-size:16px;
}

.gwsw-shop .summary-divider{
  width:100%;
}

}

/* =====================================================
   21. EXTRA SMALL DEVICES
===================================================== */

@media (max-width:480px){

.gwsw-shop .card-title{
  font-size:22px;
}

.gwsw-shop .buy-price{
  font-size:30px;
}

.gwsw-shop .btn{
  font-size:17px;
  padding:16px;
}

}

/* =====================================================
   22. PROMO CODE MODALS
===================================================== */

.gwsw-shop .promo-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.gwsw-shop .promo-modal.show{
  display:flex;
}

.gwsw-shop .promo-modal-box{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  padding:24px;
  text-align:center;
  min-width:260px;
  box-shadow:var(--shadow);
  font-weight:800;
}