/* ===============================
   SWPC FRONTEND CUSTOMISER
   =============================== */

.swpc-customiser {
    width: 100%;
    margin: 0 auto;
    padding: 0px 20px;
    box-sizing: border-box;
}

.swpc-heading {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 10px;
}

.swpc-step {
  font-size: 18px;
  margin-bottom: 25px;
}

/* GRID */
.swpc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

/* CARD */
.swpc-card {
    border: 2px solid #eee;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.swpc-card:hover {
  border-color: #f1d800;
  transform: translateY(-3px);
}

/* SELECTED */
.swpc-card.is-selected {
  border-color: #f1d800;
  box-shadow: 0 0 0 3px rgba(241, 216, 0, 0.25);
}

/* IMAGE */
.swpc-image {
  width: 100%;
  margin-bottom: 12px;
}

.swpc-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* TITLE */
.swpc-title {
  font-size: 16px;
  font-weight: 700;
  margin: 10px 0;
}

/* OPTIONS */
.swpc-options {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.swpc-options li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
}

.swpc-options .print::before {
  content: "🖨️";
}

.swpc-options .embroidery::before {
  content: "🧵";
}


.swpc-continue:hover {
  background: #e5cc00;
}

.swpc-customiser-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    width: 80%;
    margin: 20px auto;
}
.swpc-heading {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
}

.swpc-step {
    font-weight: 600;
    margin-bottom: 10px;
}

.swpc-selected {
    color: #666;
    margin-bottom: 20px;
}

.swpc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.swpc-card {
    border: 2px solid #e5e5e5;
    padding: 0px 0px 15px 0px;
    text-align: center;
    cursor: pointer;
    position: relative;
    background: #fff;
}

.swpc-card.active {
    border-color: #f2e500;
}

.swpc-check {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f2e500;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.swpc-card.active .swpc-check {
    display: flex;
}

.swpc-image img {
    max-width: 100%;
    height: auto;
}

.swpc-title {
    margin: 10px 0;
    font-weight: 600;
}

.swpc-options {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.swpc-options li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.swpc-continue {
    margin-top: 30px;
    padding: 14px 20px;
    background: #f5d400;
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: #000 !important;
    text-decoration: none;
}

.swpc-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sidebar */

.swpc-sidebar {
    background: #fafafa;
    padding: 20px;
    border: 1px solid #eee;
}

.swpc-summary-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.swpc-summary-item.active{
    background:#f5f8ff;
    border-left:4px solid #2b6cff;
}

.swpc-summary-item img {
    width: 90px;
    height: 90px;
    border: 1px solid #eee;
    box-shadow: 1px 1px 1px #eee;
}
.swpc-summary-note {
    color: #666;
    font-size: 14px;
}

.swpc-step-panel {
    display: none;
}

.swpc-step-panel.is-active {
    display: block;
}

.swpc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.swpc-card {
    border: 2px solid #ddd;
    padding: 10px;
    cursor: pointer;
    position: relative;
}

.swpc-card.active {
    border-color: #f2e500;
}

.swpc-check {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    color: green;
    font-weight: bold;
}

.swpc-card.active .swpc-check {
    display: block;
}

.swpc-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.swpc-method {
    border: 2px solid #ddd;
    padding: 15px;
    cursor: pointer;
    position: relative;
}

.swpc-method.active {
    border-color: #f2e500;
}

.recommended {
    position: absolute;
    top: 5px;
    left: 5px;
    background: orange;
    color: #fff;
    font-size: 12px;
    padding: 3px 6px;
}

.swpc-card .swpc-check {
    display: none;
}

.swpc-card.active .swpc-check {
    display: block;
}

.swpc-card.active {
    border: 2px solid #f2e500;
}

.swpc-customiser-layout{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:30px;
    width:80%;
    margin:30px auto;
}

.swpc-step-panel{display:none}
.swpc-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:20px;
}

.swpc-card, .swpc-method {
    border: 2px solid #ddd;
    padding: 0px 0px 0px 0px;
    cursor: pointer;
    position: relative;
    text-align: center;
}

.swpc-card.active,.swpc-method.active{
    border-color:#f2e500;
}

.swpc-check{
    position:absolute;
    top:8px;
    right:8px;
    display:none;
}

.swpc-card.active .swpc-check{display:block}

.swpc-methods{
    display:grid;
    gap:20px;
}

.recommended{
    position:absolute;
    top:5px;
    left:5px;
    background:orange;
    color:#fff;
    padding:4px 6px;
    font-size:12px;
}

.swpc-actions{
    display:flex;
    justify-content:space-between;
    margin-top:20px;
}

.swpc-sidebar{
    background:#fafafa;
    padding:20px;
    border:1px solid #eee;
}

/* STEP 2 container */
.swpc-methods{
    background:#f5f5f5;
    padding:30px;
    border-radius:6px;
}

/* Card */
.swpc-method{
    background:#fff;
    border:2px solid #ddd;
    position:relative;
    cursor:pointer;
}

.swpc-method.active{
    border-color:#f2e500;
}

/* Inner layout */
.swpc-method-inner {
    display: grid;
    grid-template-columns: 260px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 0px 20px 0px 0px;
    text-align: left;
}

/* Image */
.swpc-method-image img{
    width:100%;
    height:auto;
    display:block;
}

/* Content */
.swpc-method-content h4{
    margin:0 0 10px;
    font-size:22px;
    font-weight:800;
}

.swpc-method-content p{
    margin:0;
    font-size:16px;
    color:#555;
    max-width:520px;
}

/* Recommended badge */
.recommended{
    position:absolute;
    top:10px;
    left:10px;
    background:#ff9800;
    color:#fff;
    font-size:12px;
    font-weight:700;
    padding:5px 8px;
}

/* Check icon */
.swpc-method-check{
    display:none;
    width:32px;
    height:32px;
    background:#f2e500;
    color:#fff;
    border-radius:50%;
    align-items:center;
    justify-content:center;
    font-weight:bold;
}

.swpc-method.active .swpc-method-check{
    display:flex;
}

/* STEP 3 */
.swpc-app-types{
    background:#f5f5f5;
    padding:30px;
    border-radius:6px;
}

.swpc-app-type{
    background:#fff;
    border:2px solid #ddd;
    padding:20px;
    margin-bottom:15px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    cursor:pointer;
}

.swpc-app-type.active{
    border-color:#f2e500;
}

.swpc-radio{
    width:22px;
    height:22px;
    border:2px solid #999;
    border-radius:50%;
    margin-right:15px;
    position:relative;
}

.swpc-app-type.active .swpc-radio{
    border-color:#f2e500;
}

.swpc-app-type.active .swpc-radio::after{
    content:'';
    width:10px;
    height:10px;
    background:#f2e500;
    border-radius:50%;
    position:absolute;
    top:4px;
    left:4px;
}

.swpc-app-label{
    font-size:20px;
    font-weight:700;
    flex:1;
}

.swpc-app-icon{
    font-size:26px;
    opacity:0.6;
}

.swpc-info-box{
    margin-top:25px;
    background:#fff;
    border:1px solid #eee;
    padding:20px;
}

.swpc-info-box .note{
    color:#666;
    margin-top:10px;
}
.swpc-selected-text{
    text-transform: capitalize;
}

.swpc-config{
    display:none;
    background:#f5f5f5;
    padding:25px;
    margin-bottom:20px;
}

.swpc-upload-box{
    background:#fff;
    border:2px dashed #ccc;
    padding:30px;
    text-align:center;
}

.swpc-preview{
    background:#555;
    color:#fff;
    padding:30px;
    text-align:center;
    margin:20px 0;
}

/* ===============================
   STEP 4 WRAPPER
=============================== */
.swpc-step-panel[data-step="4"] {
    max-width: 1100px;
    margin: 0 auto;
}

/* Heading */
.swpc-step-panel[data-step="4"] .swpc-heading {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -1px;
}

.swpc-step-panel[data-step="4"] .swpc-step {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
}

/* ===============================
   UPLOAD SECTION
=============================== */
.swpc-config-logo {
    background: #f5f5f5;
    padding: 35px;
}

/* Title */
.swpc-config-logo h4 {
    font-size: 22px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Upload box */
.swpc-upload-box {
    border: 2px dashed #cfcfcf;
    background: #fff;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
}

/* Upload button */
.swpc-upload-btn {
    background: #f5e400;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    margin-bottom: 10px;
}

/* Upload text */
.swpc-upload-box p {
    margin: 30px 0 10px 0px;
    font-size: 16px;
}

.swpc-upload-box small {
    font-size: 14px;
    color: #555;
}

/* ===============================
   RADIO OPTIONS
=============================== */
.swpc-alt-options {
    margin-top: 15px;
}

.swpc-alt-options label {
    display: block;
    font-size: 16px;
    margin-bottom: 10px;
    cursor: pointer;
}

/* ===============================
   NOTES
=============================== */
.swpc-notes {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 1px solid #ccc;
    font-size: 16px;
    margin-top: 15px;
}

/* ===============================
   ACTION BUTTONS
=============================== */
.swpc-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}


/* ===============================
   CONFIDENCE BOX
=============================== */
.swpc-info-box {
    margin-top: 30px;
    background: #fff;
    padding: 25px;
    border: 1px solid #eee;
}

.swpc-info-box strong {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
}

/* ===============================
   STEP 5 – TEXT LOGO CONFIG
================================ */

.swpc-config-text {
    background: #f5f5f5;
    padding: 30px;
    border-radius: 4px;
}

/* Section heading */
.swpc-config-text h3,
.swpc-config-text h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Labels */
.swpc-config-text label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.swpc-config-text label span.required {
    color: #e60000;
}

/* Inputs */
.swpc-config-text input[type="text"],
.swpc-config-text select,
.swpc-config-text textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    font-size: 15px;
    margin-bottom: 18px;
    background: #fff;
}

/* Two-column layout (Font / Colour) */
.swpc-text-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Colour select with dot */
.swpc-colour-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swpc-colour-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f5c400;
    border: 1px solid #ccc;
}

/* Preview box */
.swpc-text-preview-wrap {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 25px;
    margin-top: 10px;
}

.swpc-text-preview {
    background: #555;
    color: #f5c400;
    text-align: center;
    padding: 40px 10px;
    font-size: 28px;
    font-weight: 600;
}

/* Notes */
.swpc-config-text textarea {
    min-height: 120px;
    resize: vertical;
}

/* Actions */
.swpc-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
        align-items: flex-end;
}

.swpc-actions .swpc-back{
    height:50px;
}

.swpc-actions .swpc-finish {
    background: #f2e500;
    color: #000;
    padding: 14px 40px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.swpc-finish {
  position: relative;
  transition: transform 0.15s ease, background 0.2s ease;
}

.swpc-finish:active {
  transform: scale(0.97);
}

.swpc-finish.loading {
  pointer-events: none;
  opacity: 0.85;
  background: #e5d800;
}

.swpc-finish.loading::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: swpc-spin 0.8s linear infinite;
}

@keyframes swpc-spin {
  to { transform: rotate(360deg) translate(-50%, -50%); }
}


.swpc-logo-uploaded {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #fff;
    padding: 20px;
    border: 1px solid #e5e5e5;
    margin-top: 20px;
}

.swpc-logo-uploaded img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.swpc-logo-meta {
    flex: 1;
}

.swpc-logo-remove {
    background: none;
    border: none;
    color: #d00;
    cursor: pointer;
    padding: 0;
    font-weight: 600;
}

/* ===============================
   SELECT2 FIXES (FRONTEND)
=============================== */
.select2-container {
    width: 100% !important;
}

.select2-selection {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.select2-selection__rendered {
    display: flex;
    align-items: center;
    gap: 10px;
}

.select2-results__option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swpc-preview-wrap {
    background: #f5f5f5;
    padding: 20px 0px;
}

.swpc-preview-canvas {
    background: #555;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#swpc-preview-text {
    text-align: center;
    font-size: 28px;
    line-height: 1.4;
    color: #fff;
}

#swpc-preview-text div {
    margin: 4px 0;
}

/* Put Font + Colour side-by-side */
.swpc-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* Make selects + select2 fill the grid columns */
.swpc-row select{
  width: 100%;
}

/* Select2 renders its own container, force it to fit */
.swpc-row .select2-container{
  width: 100% !important;
  min-width: 0;
}

.swpc-cart-sidebar {
  background: #f7f7f7;
  padding: 20px;
  border-radius: 6px;
  max-width: 360px;
}

.swpc-cart-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.swpc-cart-totals .row {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
}

.swpc-cart-totals .total {
  font-size: 18px;
  font-weight: bold;
}

.swpc-checkout-btn {
  display: block;
  margin-top: 20px;
  text-align: center;
  background: #f5e400;
  color: #000 !important;
  padding: 14px;
  font-weight: bold;
  text-decoration: none;
}

.swpc-row .select2-container{
    position: relative;
    z-index: 9999 !important;
}

/* FORCE variation meta into single line rows */
.woocommerce-cart table.shop_table dl.variation {
    display: grid !important;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    row-gap: 4px;
}

.woocommerce-cart table.shop_table dl.variation dt,
.woocommerce-cart table.shop_table dl.variation dd {
    margin: 0 !important;
    float: none !important;
    display: block !important;
}

.woocommerce-cart table.shop_table dl.variation dt {
    font-weight: 600;
}


/* =====================================
   SWPC CART CUSTOMISATION DESIGN
===================================== */

/* Main customisation wrapper */
.woocommerce .variation,
.swpc-cart-logo {
    background: #f7f7f7;
    border: 1px solid #e6e6e6;
    padding: 14px 16px;
    margin-top: 8px;
    border-radius: 8px;
    display: block;
}

/* Remove Woo default ugly spacing */
.woocommerce table.shop_table .variation dt,
.woocommerce table.shop_table .variation dd {
    margin: 0;
    padding: 2px 0;
}

/* Labels (Text Line, Font, Method etc) */
.woocommerce table.shop_table .variation dt {
    font-weight: 600;
    color: #222;
    font-size: 13px;
    min-width: 110px;
}

/* Values */
.woocommerce table.shop_table .variation dd {
    color: #555;
    font-size: 13px;
}

/* Logo preview styling */
.swpc-cart-logo img {
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    padding: 3px;
}

/* Positions + Method small info */
.swpc-cart-logo small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
}

/* =====================================
   EDIT CUSTOMISATION BUTTON
===================================== */

.swpc-edit-customisation {
    margin: 6px 0 6px 0;
}

.swpc-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f2e500;
    color: #111 !important;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all .2s ease;
}

.swpc-edit-btn:hover {
    background: #111;
    color: #f2e500 !important;
}

/* =====================================
   COLOR BOX ALIGNMENT
===================================== */

.wrapcolorbx {
    display: inline-flex;
    align-items: center;
}

.colorbx {
    border-radius: 3px;
}

/* =====================================
   CLEAN PRODUCT ROW SPACING
===================================== */

.woocommerce-cart .product-name {
    line-height: 1.4;
}

/* Separate multiple customised products */
.woocommerce-cart tr.cart_item {
    border-bottom: 1px solid #ececec;
}

/* =====================================
   MAKE CUSTOM DATA LOOK LIKE CARD
===================================== */

.woocommerce table.shop_table .variation {
    display: grid;
    grid-template-columns: 120px auto;
    column-gap: 10px;
}

/* make cart product column flexible */
.woocommerce-cart td.product-name {
    display: flex;
    flex-direction: column;
}

/* variation/customisation block FIRST */
.woocommerce-cart td.product-name .variation {
    order: 2;
}

.woocommerce-cart td.product-name .variation,
.woocommerce-cart td.product-name .wcpa_cart_meta {
    order: 2;
}

/* edit button AFTER customisation */
.woocommerce-cart td.product-name .swpc-edit-customisation {
    order: 3;
    margin-top: 12px;
}

/* product title always top */
.woocommerce-cart td.product-name > a {
    order: 1;
}

/* variation/customisation block FIRST */
.woocommerce-cart td.product-name .variation {
    order: 2;
}

/* edit button AFTER customisation */
.woocommerce-cart td.product-name .swpc-edit-customisation {
    order: 3;
    margin-top: 12px;
}

/* product title always top */
.woocommerce-cart td.product-name > a {
    order: 1;
}

/* Customisation block card */

.woocommerce table.shop_table .wcpa_cart_meta{
    list-style:none;
    margin-top:12px;
    padding:14px;
    border-radius:8px;
    background:#f8fafc;
    border:1px solid #e5e7eb;
}

.woocommerce table.shop_table .wcpa_cart_meta li{
    display:grid;
    grid-template-columns:130px auto;
    gap:8px;
    padding:4px 0;
}

.wcpa_cart_meta_item-label{
    font-weight:600;
    color:#374151;
    font-size:13px;
    margin-block-end: 0px !important;
}
.wcpa_cart_meta_item-value{
    font-size:13px;
    color:#111827;
}
.wcpa_cart_meta_item-value p{
     margin-block-end: 0px !important;
}

.swpc-cart-logo img{
    border-radius:4px;
    border:1px solid #ddd;
}

/* Mobile fix */
@media (max-width:768px) {

    .woocommerce table.shop_table .variation {
        grid-template-columns: 1fr;
    }

    .woocommerce table.shop_table .variation dt {
        margin-top: 6px;
    }
}

/* Stack on small screens */
@media (max-width: 768px){
  .swpc-row{
    grid-template-columns: 1fr;
  }
}



/* MOBILE */
@media (max-width: 600px) {
  .swpc-heading {
    font-size: 30px;
  }
}

@media(min-width:320px) and (max-width:568px){
    .swpc-customiser-layout{
        display: block !important;
            padding: 0px 0px !important;
    }

    .swpc-customiser-layout{
        width: fit-content;
    }
}