/* Printful Catalog Styles */

/* ===== Price Breakdown Panel ===== */


.pf-price-breakdown h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #111;
}

.pf-pb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

.pf-pb-row:last-child {
    border-bottom: none;
}

.pf-pb-label {
    color: #374151;
}

.pf-pb-amount {
    color: #111;
    font-weight: 500;
}

.pf-pb-total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #e5e7eb;
    border-bottom: none;
}

.pf-pb-total .pf-pb-label,
.pf-pb-total .pf-pb-amount {
    font-size: 15px;
}

.pf-pb-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 6px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}
.printful-catalog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* === Responsive grid: columns controlled by CSS vars set from JS === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(var(--pf-cols, 4), minmax(0, 1fr)); /* desktop from JS */
  gap: 20px;
  margin-bottom: 30px;
}

/* Tablet: cap at 3 (but let JS lower it if needed) */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(var(--pf-cols-md, 3), minmax(0, 1fr));
  }
}

/* Mobile: cap at 2 */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(var(--pf-cols-sm, 2), minmax(0, 1fr));
    gap: 15px;
  }
}

/* Phone narrow: single column */
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
}

.product-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 6px;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 10px 0;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.4;
}

.product-id {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
}

.product-category {
    font-size: 14px;
    color: #007cba;
    font-weight: 500;
    margin: 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 10px 0;
}

.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.load-more-container button{
    max-width: 250px;
}

/* Design Maker Page Styles */
#design-maker-container {
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 80px;
}

.design-info h2{
	margin-top: 0;
  margin-bottom: 10px;
}

.design-maker-header {
    display: flex;
    justify-content: space-between;
    align-items: self-end;
    margin-bottom: 20px;
    padding: 0 0 15px 0;
    border-bottom: 1px solid #e1e5e9;
}

.design-name-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    width: 250px;
}

.design-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#save-design-draft {
    background: #28a745;
    color: white;
}

#save-design-draft:hover {
    background: #218838;
}

#add-design-to-cart {
    background: #007cba;
    color: white;
}

#add-design-to-cart:hover {
    background: #005a87;
}

/* My Designs Section */
.my-designs-section {
    padding: 20px 0;
}

.my-designs-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.designs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
  .designs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .designs-grid { grid-template-columns: 1fr; }
}

.design-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.design-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pf-btn--danger {
    background: #c53030;
    color: #fff;
}
.pf-btn--danger:hover {
    background: #9b2c2c;
    color: #fff;
}

.design-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.design-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.design-card p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.design-card p strong {
    color: #333;
}

.design-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.design-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 170px;
}

.edit-design {
    background: #6c757d;
    color: white;
}

.edit-design:hover {
    background: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    .design-maker-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .design-name-input {
        width: 100%;
        box-sizing: border-box;
    }
    
    .design-actions {
        justify-content: center;
    }
    
    .designs-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 212, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Error States */
.printful-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
}

.printful-error p {
    color: #c53030;
    margin: 0;
    font-weight: 500;
}

.error-message {
    color: #c53030;
    background: #fff5f5;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #c53030;
    margin-top: 10px;
}

.no-more-products {
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
}

/* Image loading states */
.product-image img {
    background: #f8f9fa;
    transition: opacity 0.3s ease;
}

.product-image img[loading="lazy"] {
    opacity: 0;
}

.product-image img.loaded {
    opacity: 1;
}

/* Status badges */
.status-draft {
    background: #ffc107;
    color: #856404;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-in_cart {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-completed {
    background: #007cba;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.edm-container {
    width: 100%;
    height: calc(85vh - 95px);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}

.edm-container iframe {
    position: absolute;
    inset: 0;                          /* top/right/bottom/left: 0 */
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    display: block;
}

.edm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f8f9fa;
}

.edm-loading p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.edm-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    padding: 40px 20px;
}

.edm-fallback p {
    color: #c53030;
    margin: 10px 0;
    text-align: center;
    font-size: 16px;
}

.edm-fallback .button {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.edm-fallback .button:hover {
    background: #005a87;
    color: white;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* Modal Styles */
.printful-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.printful-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.printful-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.printful-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.modal-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal {
    background: #dc3545;
    color: white;
    font-size: 20px;
    font-weight: bold;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: #c82333;
}

#modal-save-draft {
    background: #28a745;
    color: white;
}

#modal-save-draft:hover {
    background: #218838;
}

#modal-add-to-cart {
    background: #007cba;
    color: white;
}

#modal-add-to-cart:hover {
    background: #005a87;
}

.modal-edm-container {
    flex: 1;
    padding: 20px;
    overflow: hidden;
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .printful-modal-content {
        width: 95%;
        height: 95%;
    }
    
    .printful-modal-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-actions {
        justify-content: space-between;
    }
    
    .modal-edm-container {
        padding: 10px;
    }
}

.pf-btn{
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.pf-btn--primary{
    background: #ffd400;
    color: #000;
}

.pf-btn--primary:hover{
    background: #ffd400;
    color: #000;
}

.pf-btn--secondary{
    background: #000;
    color: #ffd400;
}

.pf-btn--secondary:hover{
    background: #000;
    color: #ffd400;
}

.pf-btn--disabled,
.pf-btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
    color: grey;
}

.pf-filter-bar { display:flex; flex-wrap:wrap; gap:.5rem; margin:0 0 1rem; }
.pf-filter-btn {
  border:1px solid #ccc; background:#fff; padding:.5rem .9rem; border-radius:6px;
  cursor:pointer; font-size:.95rem;
}
.pf-filter-btn.is-active { border-color:#111; box-shadow:0 0 0 2px #111 inset; }

.pf-designer-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 0;
  flex-wrap:nowrap;          /* keep one line */
  overflow-x:auto;           /* stay one line on tiny screens; allow gentle scroll */
  scrollbar-width: thin;
}

.pf-designer-header .pf-title{
  flex:0 0 auto;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
}

.pf-designer-header .pf-name{
  flex:1 1 320px;            /* this is the stretchiest part */
  min-width:160px;
}
.pf-designer-header .pf-name input,
.pf-designer-header .pf-name .wp-block-search__input,
.pf-designer-header .pf-name input[type="text"]{
  width:100%;
}

/* Price */
.pf-designer-header .pf-price{
  flex:0 0 auto;
  white-space:nowrap;
}

/* Buttons */
.pf-designer-header .pf-actions{
  display:flex;
  gap:8px;
  flex:0 0 auto;
}
.pf-designer-header .pf-actions .button,
.pf-designer-header .pf-actions button,
.pf-designer-header .pf-actions a{
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
}

/* Tighten spacing & size on very small viewports while staying one line */
@media (max-width: 640px){
  .pf-designer-header{ gap:8px; }
  .pf-designer-header .pf-title{ max-width:28vw; } /* keeps room for input/buttons */
  .pf-designer-header .pf-actions .button,
  .pf-designer-header .pf-actions button,
  .pf-designer-header .pf-actions a{
    padding:8px 12px;
    font-size:0.92rem;
  }
}

.printful-catalog-container .pf-filter-row{
  display:flex;
  align-items:center;
  gap:.65rem;
  margin: 0 0 1.2rem;
}

.printful-catalog-container .pf-filter-label{
  font: 600 clamp(1rem, 1vw + .6rem, 1.125rem)/1 var(--pc-font);
  color: var(--pc-color-fg);
  letter-spacing:.2px;
}

.printful-catalog-container .pf-filter-select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  font: 500 1rem/1.2 var(--pc-font);
  color: var(--pc-color-fg);
  background: var(--pc-color-bg);
  border-radius: var(--pc-radius);
  padding: var(--pc-pad-y) calc(var(--pc-pad-x) * 2.2) var(--pc-pad-y) var(--pc-pad-x);
  min-width: 260px;
  max-width: min(560px, 90vw);
  box-shadow: var(--pc-shadow);
  transition: box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

/* caret */
.printful-catalog-container .pf-filter-select{
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 22px) 52%,
    calc(100% - 16px) 52%,
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
}

/* focus / hover */
.printful-catalog-container .pf-filter-select:focus{
  outline: none;
  box-shadow: var(--pc-shadow-focus), var(--pc-shadow);
}

/* optgroup label styling (native) */
.printful-catalog-container .pf-filter-select optgroup{
  color: color-mix(in oklab, var(--pc-color-fg) 70%, transparent);
  font-weight: 600;
}

/* compact on small screens */
@media (max-width: 782px){
  .printful-catalog-container .pf-filter-row{
    gap:.5rem;
    margin-bottom:.9rem;
  }
  .printful-catalog-container .pf-filter-label{ font-size: 1rem; }
  .printful-catalog-container .pf-filter-select{
    min-width: 200px;
    width: 100%;
  }
}

/* dark-mode friendly if theme doesn’t set vars */
@media (prefers-color-scheme: dark){
  :root{
    --pc-color-border: rgba(255,255,255,.16);
    --pc-color-border-strong: rgba(255,255,255,.25);
  }
}

.printful-catalog-container h2,
.printful-catalog-container .catalog-title{
  margin-bottom: .75rem;
}

.pfc-inline-filters{margin:16px 0 8px;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
.pfc-group{border:1px solid #eee;border-radius:10px;overflow:hidden;background:#fff}
.pfc-accordion{width:100%;text-align:left;padding:10px 12px;font-weight:600;border:none;background:#fafafa;cursor:pointer}
.pfc-panel{padding:10px 12px;max-height:260px;overflow:auto}
.pfc-check{display:flex;align-items:center;gap:8px;margin:6px 0}
.pfc-clear{display:inline-block;margin-top:6px;font-size:12px;color:#0a66c2;text-decoration:none}
.pfc-flags{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:16px;padding:6px 2px}
.pfc-flag{display:flex;align-items:center;gap:8px}

/* Reduce font size for filter texts */
.pfc-inline-filters,
.pfc-inline-filters label,
.pfc-inline-filters input[type="checkbox"] + span,
.pfc-inline-filters .pfc-check,
.pfc-inline-filters .pfc-flag,
.pfc-inline-filters .pfc-clear {
  font-size: 13px;   /* adjust down to taste */
  line-height: 1.3;  /* tighter vertical rhythm */
}

/* Shrink accordion headers too */
.pfc-inline-filters .pfc-accordion {
  font-size: 14px;
  padding: 6px 10px;
}

/* Shrink the “flags” row (eco-friendly, unisex) */
.pfc-inline-filters .pfc-flags {
  font-size: 13px;
}

.pfc-topbar {
	display:flex;justify-content:space-between;align-items:center;
	margin-bottom:12px;
	font-size:14px;
}
.pfc-filters-left, .pfc-filters-right {
	display:flex;gap:18px;align-items:center;
}
.pfc-dropdown { position:relative; }
.pfc-dropdown button {
	background:none;
	border:none;
	cursor:pointer;
	font-weight:500;
	font-size: 12px!important;
	font-family: 'Roboto', sans-serif;
}
.pfc-dropdown-panel {
	position:absolute;top:100%;left:0;z-index:50;
	background:#fff;border:1px solid #ddd;border-radius:6px;
	padding:10px;display:none;min-width:200px;max-height:300px;overflow:auto;
}
.pfc-dropdown:hover .pfc-dropdown-panel { display:block; }
.pfc-dropdown-panel label { display:block;margin:4px 0;font-weight:normal; }
.pfc-dropdown-panel strong { display:block;margin-top:8px;font-size:12px;color:#444; }

/* During AJAX loads, hide any stray content instantly */
#pf-products-grid.pf-loading {
  opacity: 0;
  pointer-events: none;
}

/* Optional: animate in after load (looks nicer) */
#pf-products-grid {
  transition: opacity .15s ease-in-out;
}

.pfc-filters-label{ font-size: 16px; font-weight: bold; }


/* Full-width trigger (hidden on desktop) */
.pfc-filter-trigger {
  display: none;
  width: 100%;
  padding: 12px 16px;
  font-weight: 600;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  margin: 10px 0 18px;
}

/* Overlay + right drawer */
.pfc-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.pfc-filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  max-height: 100dvh;
  width: min(250px, 85vw);
  background: #fff;
  box-shadow: -12px 0 24px rgba(0,0,0,.12);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 0;
}
.pfc-filter-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pfc-filter-drawer__header h3{
  font-size: 22px;
  font-weight: 600;
}
.pfc-filter-drawer__header button{
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #000;
  z-index: 1001;
  padding: 0;
}
.pfc-filter-drawer__content {
  overflow: auto;
  flex: 1 1 auto;
}
.pfc-filter-drawer__footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  z-index: 1;  
}
.pfc-btn {
  appearance: none;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  background: #ffd400; /* Droneit yellow */
}
.pfc-btn--ghost { background: #ffd400; color: #000;}

/* Open states */
.pfc-filter-overlay.is-open { opacity: 1; pointer-events: auto; }
.pfc-filter-drawer.is-open { transform: translateX(0); }

/* Tablet/Mobile only */
@media (max-width: 1024px) {
  .pfc-filter-trigger { display: block; }
  /* Hide inline filters row on small screens (drawer takes over) */
  .pfc-filters-left, .pfc-filters-right { display: none !important; }
  /* Tighten spacing of filter blocks inside the drawer */
  #pfc-filter-dock .pfc-dropdown { margin-bottom: 10px; }
}

@media (max-width: 678px){
    .pfc-dropdown button{ font-size: 16px!important; padding-left: 0;}
}

/* Keep focus visible but neat */
#pfc-filter-trigger:focus,
.pfc-filter-drawer__close:focus { outline: 2px solid #ffd100; outline-offset: 2px; }

/* Outer modal shell */
.pf-size-guide-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.pf-size-guide-modal.open {
  display: block;
}

/* Dimmed background */
.pf-sg-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* Main card */
.pf-sg-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  padding: 16px 18px;
  width: 92%;
  max-width: 620px;
  max-height: 82vh;           /* key: fit viewport */
  overflow-y: auto;           /* scroll INSIDE modal */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  line-height: 1.4;
  height: 600px;
  overflow-y: auto;
}

/* Header */
.pf-sg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pf-sg-header h2 {
  font-size: 18px;
  margin: 0;
}

.pf-sg-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

/* Top tabs (Product measurements / Measure yourself) */
.pf-sg-top-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.pf-sg-top-tab,
.pf-sg-tab {
  border: none;
  background: none;
  padding: 4px 8px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 16px;
}

.pf-sg-top-tab.active,
.pf-sg-tab.active {
  border-color: #000;
  font-weight: 600;
}

/* Top content layout */
.pf-sg-top-content {
  margin-bottom: 10px;
}

.pf-sg-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.pf-sg-top-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.pf-sg-top-text h6 + p {
    margin-bottom: 20px;   /* adjust to taste */
}

.pf-sg-top-text h6,
.pf-sg-top-text p {
  margin: 0;
  font-size: 14px;
}

@media (min-width: 640px) {
  .pf-sg-top-grid {
    grid-template-columns: 0.9fr 1.6fr;
  }
}

/* Section titles */
.pf-sg-subtitle {
  margin: 10px 0 2px;
  font-size: 14px;
}

.pf-sg-subsubtitle {
  margin: 0 0 6px;
  font-size: 13px;
  opacity: 0.8;
}

/* Bottom tabs (Inches / Centimeters) */
.pf-sg-tabs {
  margin-bottom: 4px;
}

/* Table */
.pf-sg-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pf-sg-table th,
.pf-sg-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.pf-sg-note {
  margin-top: 6px;
  font-size: 14px;
}
.pf-sg-note p{
  margin: 0;
}

/* current desktop layout – leave this alone if it already exists */
.pf-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin: 8px 0;
}

/* MOBILE: stack price + buttons into 4 rows */
@media (max-width: 768px) {
  .pf-sg-content{
    width: 85%;
  }
  .pf-toolbar {
    flex-direction: column;      /* stack vertically */
    align-items: stretch;        /* full-width items */
    gap: 8px;
  }

  /* price on first row */
  .pf-toolbar .pf-price {
    margin-top: 0;               /* optional: remove big top margin */
    align-self: flex-start;
  }

  /* wrap the three buttons as a column */
  .pf-toolbar .design-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 0;
  }

  /* make each button full width */
  .pf-toolbar .design-actions .btn,
  .pf-toolbar .design-actions button,
  .pf-toolbar .design-actions a {
    width: 100%;
    text-align: center;
  }
}

.pf-sg-top-content h6{
  margin-bottom: 0!important;
}

.pf-sg-subtitle{ font-size: 16px; margin-bottom: 8px; }
.pf-sg-subsubtitle{display: none;}

/* ---- Bottom sticky bar ---- */
.pf-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9998;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}
.pf-bottom-bar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pf-bottom-bar__thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: #f7f7f7;
}
.pf-bottom-bar__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pf-bottom-bar__title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a202c;
}
.pf-bottom-bar__price {
    font-size: 0.85rem;
    color: #4a5568;
}
.pf-btn--continue {
    background: #ffd400;
    color: #000;
    padding: 10px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background .15s;
}
.pf-btn--continue:hover {
    background: #e6bf00;
}
.pf-btn--continue:disabled {
    background: #ffe980;
    cursor: not-allowed;
}

/* ---- Bottom bar info button ---- */
.pf-bottom-bar__info-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #718096;
    padding: 0 0 0 4px;
    line-height: 1;
    vertical-align: middle;
}
.pf-bottom-bar__info-btn:hover {
    color: #2d3748;
}

.pf-bottom-bar__price-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pf-bottom-bar__fee-note {
    font-size: 0.72rem;
    color: #718096;
    margin-top: 2px;
    font-style: italic;
}

/* ============================================================
   DESIGN MAKER PAGE — Redesigned header + controls
   ============================================================ */

/* ── Outline button variant (SIZE GUIDE) ─────────────────── */
.pf-btn--outline {
  background: #fff;
  color: #111;
  border: 1.5px solid #111 !important;
}
.pf-btn--outline:hover {
  background: #f5f5f5;
  color: #111;
}

/* ── Header layout ───────────────────────────────────────── */
.pf-dm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 14px;
  border-bottom: 1px solid #e5e7eb;
  gap: 16px;
  flex-wrap: nowrap;
}

/* Left: label + name input stacked */
.pf-dm-header__left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pf-dm-header__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #9ca3af;
  line-height: 1;
}

.pf-dm-header__name {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  border: none;
  border-bottom: 2px solid #e5e7eb;
  border-radius: 0;
  padding: 2px 0;
  background: transparent;
  width: 280px;
  max-width: 100%;
  transition: border-color 0.2s ease;
  line-height: 1.3;
}
.pf-dm-header__name:focus {
  outline: none;
  border-bottom-color: #ffd400;
}
.pf-dm-header__name::placeholder {
  color: #d1d5db;
  font-weight: 400;
}

/* Right: price + action buttons */
.pf-dm-header__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pf-dm-header__price {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin-right: 4px;
}

/* Reset auto-width for buttons inside the header */
.pf-dm-header__right .pf-btn {
  width: auto;
  min-width: 0;
  padding: 10px 20px;
  font-size: 13px;
  border-radius: 25px;
}

/* ── EDM iframe container ────────────────────────────────── */
#design-maker-container .edm-container {
  margin-top: 14px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

/* ── Bottom bar ──────────────────────────────────────────── */
.pf-bottom-bar {
  padding: 10px 28px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.07);
  border-top: 1px solid #e5e7eb;
}

.pf-bottom-bar__thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
}

.pf-bottom-bar__title {
  font-size: 0.88rem;
  font-weight: 600;
}

.pf-bottom-bar__price {
  font-size: 0.82rem;
  color: #6b7280;
}

.pf-bottom-bar__fee-note {
  font-size: 0.68rem;
}

.pf-btn--continue {
  border-radius: 25px;
  padding: 11px 32px;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .pf-dm-header {
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 12px;
  }
  .pf-dm-header__name {
    font-size: 17px;
    width: 100%;
  }
  .pf-dm-header__right {
    width: 100%;
    justify-content: flex-end;
  }
  .pf-dm-header__right .pf-btn {
    padding: 9px 14px;
    font-size: 12px;
  }
  .pf-bottom-bar {
    padding: 10px 16px;
  }
}

/* ============================================================
   BOTTOM BAR — Prominent price + notice
   ============================================================ */

/* Make the info column a bit more spacious */
#pf-bottom-bar .pf-bottom-bar__info {
  gap: 3px;
}

/* Product name — slightly muted so price stands out more */
#pf-bottom-bar .pf-bottom-bar__title {
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 500;
}

/* Price — large, bold, dark */
#pf-bottom-bar .pf-bottom-bar__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

/* Fee notice — clearly readable, amber-tinted */
#pf-bottom-bar .pf-bottom-bar__fee-note {
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 500;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  padding: 3px 8px;
  margin-top: 4px;
  display: inline-block;
  line-height: 1.4;
}

/* SAVE DESIGN — pill, slightly taller */
#pf-bottom-bar .pf-btn--continue {
  border-radius: 25px;
  padding: 13px 36px;
  font-size: 1rem;
  letter-spacing: 0.4px;
}

@media (max-width: 640px) {
  #pf-bottom-bar .pf-bottom-bar__price {
    font-size: 1.05rem;
  }
  #pf-bottom-bar .pf-btn--continue {
    padding: 11px 24px;
    font-size: 0.9rem;
  }
}
