/* =============================
   EasyTags Designer v1.9.90 - FIXED
   ============================= */

   .easytags-designer {
    --cart-thumb-size: 60px;
    --icon-scale: 1.5;
    font-family: Arial, sans-serif;
    max-width: 769px;
    margin: 0 auto;
    padding: 12px;
  }
  
  /* Grid layout - SIDE BY SIDE ON DESKTOP, STACKED ON MOBILE */
  .designer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    width: 100%;
    max-width: 768px;
    box-sizing: border-box;
    position: relative;
  }
  
  /* PREVIEW CONTAINER - PROPER STICKY POSITIONING */
  .designer-left {
    position: sticky;
    top: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #faf5f2;
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 15px 9px 0 rgba(0,0,0,0.034);
    border: 1px solid #e5e7eb;
    margin-bottom: 0;
    transition: all 0.3s ease;
    align-self: start;
    height: fit-content;
  }
  
  /* INPUTS CONTAINER - CENTERED ON DESKTOP */
  .designer-right {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  
  /* INPUT BOXES - REDUCED SIZE BY 1/3 */
  .easytags-inputs {
    position: relative;
    margin-bottom: 20px;
    width: 66.666%;
    max-width: 300px;
  }
  
  .easytags-inputs input {
    width: 100%;
    padding: 10px 70px 10px 12px;
    margin: 6px 0;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
    font-size: 16px;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
  }
  
  .easytags-inputs input:focus {
    border-color: #0073aa !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.2);
  }
  
  /* Character counter next to input boxes */
  .input-counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
  }
  
  /* Label container - FIXED SIZE FOR ALL SCREENS */
  #label-shape {
    position: relative;
    background: #fff;
    border: 1px solid #c8c8c8 !important;
    box-shadow: 0 6px 16px 5px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden;
    text-align: center;
    margin: 0 auto;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Shape variants - FIXED SIZES FOR ALL SCREENS */
  #label-shape.shape-circle,
  #label-shape.shape-square {
    width: 250px !important;
    height: 250px !important;
  }
  
  #label-shape.shape-circle { 
    border-radius: 50%; 
  }
  
  #label-shape.shape-square { 
    border-radius: 12px; 
  }
  
  #label-shape.shape-rectangle { 
    border-radius: 12px; 
    width: 360px !important;
    height: 160px !important;
  }
  
  /* ICON POSITIONING */
  #label-shape.shape-rectangle #label-icon {
    left: 12px;
    top: 50%;
    transform: translateY(-50%) scale(var(--icon-scale));
  }
  
  #label-shape.shape-circle #label-icon,
  #label-shape.shape-square #label-icon {
    left: 50%;
    top: 20px;
    transform: translateX(-50%) scale(1.2);
  }
  
  #label-icon {
    position: absolute;
    width: 80px !important;
    height: 80px !important;
    object-fit: contain;
    display: none;
    z-index: 2;
    transition: all 0.3s ease;
  }
  
  #label-shape.has-icon #label-icon {
    display: block;
  }
  
  #label-text {
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px;
    overflow: visible !important;
    box-sizing: border-box;
  }
  
  /* Shape-specific text containers */
  #label-shape.shape-circle #label-text {
    padding: 20px !important;
    width: 80% !important;
    height: 80% !important;
    left: 10% !important;
    top: 10% !important;
    overflow: visible !important;
  }
  
  #label-shape.shape-square #label-text {
    padding: 20px !important;
    overflow: visible !important;
  }
  
  #label-shape.shape-rectangle #label-text {
    padding: 8px 12px !important;
    overflow: visible !important;
  }
  
  /* Text padding adjustments for icons */
  #label-shape.shape-rectangle.has-icon #label-text {
    padding-left: 85px !important;
    padding-right: 15px !important;
  }
  
  #label-shape.shape-circle.has-icon #label-text,
  #label-shape.shape-square.has-icon #label-text {
    padding-top: 70px !important;
  }
  
  /* Line 1 */
  #label-text #line1 {
    font-weight: bold;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: visible !important;
    white-space: normal;
    text-align: center;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    text-overflow: clip !important;
  }
  
  /* Line 2 */
  #label-text #line2 {
    margin-top: 8px !important;
    line-height: 1.1;
    overflow: visible !important;
    white-space: normal;
    text-align: center;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    text-overflow: clip !important;
  }
  
  /* =============================
     DESKTOP LAYOUT - ALIGN INPUTS WITH PREVIEW
     ============================= */
  
  @media (min-width: 768px) {
    .designer-right {
      align-items: flex-start !important;
      padding-left: 20px !important;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    
    .easytags-inputs {
      width: 100% !important;
      max-width: 300px !important;
      margin: 0 !important;
    }
    
    .designer-grid {
      align-items: center;
      gap: 20px !important;
      width: 100%;
    }
    
    .designer-right {
      margin-top: 0 !important;
    }
    
    .easytags-inputs input {
      width: 100% !important;
    }
    
    /* Ensure tab content fits within the grid */
    .designer-right .tabs,
    .designer-right .tab-panels {
      width: 100%;
      max-width: 100%;
    }
  }
  
  /* =============================
     MOBILE LAYOUT - STACKED WITH STICKY PREVIEW
     ============================= */
  
  @media (max-width: 768px) {
    .designer-grid {
      display: flex !important;
      flex-direction: column !important;
      gap: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      background-color: transparent !important;
      min-height: auto !important;
      height: auto !important;
      align-items: center !important;
      width: 100%;
    }
    
    .designer-left {
      margin: 0 !important;
      padding: 14px !important;
      order: 1;
      display: flex !important;
      justify-content: center !important;
      width: 100% !important;
      position: sticky !important;
      top: 10px !important;
      z-index: 100 !important;
      background-color: #faf5f2 !important;
      box-shadow: 0 15px 9px 0 rgba(0,0,0,0.034) !important;
      border-radius: 8px !important;
      height: fit-content !important;
    }
    
    .designer-right {
      margin: 0 !important;
      padding: 0 !important;
      order: 2;
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      width: 100% !important;
      max-width: 100% !important;
      margin-top: 0 !important;
    }
    
    .easytags-designer {
      padding: 4px !important;
      margin: 0 !important;
    }
    
    .easytags-inputs {
      width: 80%;
      max-width: 350px;
      margin: 8px auto !important;
    }
    
    .tabs {
      margin-top: 8px !important;
      width: 100%;
      max-width: 100%;
    }
    
    .tab-panels {
      padding: 16px !important;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    
    #label-shape {
      margin: 0 auto !important;
      transform-origin: center;
    }
    
    /* Mobile sizes */
    #label-shape.shape-circle,
    #label-shape.shape-square {
      width: 200px !important;
      height: 200px !important;
    }
    
    #label-shape.shape-rectangle { 
      width: 300px !important;
      height: 140px !important;
    }
    
    /* Mobile icon spacing */
    #label-shape.shape-rectangle.has-icon #label-text {
      padding-left: 65px !important;
      padding-right: 65px !important;
      overflow: visible !important;
    }
    
    #label-shape.shape-rectangle #label-icon {
      width: 55px !important;
      height: 55px !important;
      left: 10px;
    }
    
    #label-shape.shape-circle.has-icon #label-text,
    #label-shape.shape-square.has-icon #label-text {
      padding-top: 60px !important;
      overflow: visible !important;
    }
    
    #label-shape.shape-circle #label-icon,
    #label-shape.shape-square #label-icon {
      width: 55px !important;
      height: 55px !important;
      top: 15px;
    }
    
    /* Mobile text */
    #label-text #line1,
    #label-text #line2 {
      overflow: visible !important;
      text-overflow: clip !important;
    }
    
    /* Improve touch targets */
    .swatch,
    .font-swatch,
    .tab-button {
      min-height: 44px;
    }
    
    .easytags-inputs {
      margin-bottom: 15px;
    }
    
    .easytags-inputs input {
      font-size: 16px;
      padding: 12px 70px 12px 12px;
    }
  }
  
  @media (max-width: 480px) {
    .designer-left {
      padding: 12px !important;
      top: 5px !important;
    }
    
    .easytags-designer {
      padding: 2px !important;
      overflow-x: hidden;
    }
    
    .easytags-inputs {
      width: 90%;
      margin: 6px auto !important;
    }
    
    .tab-panels {
      padding: 12px !important;
    }
    
    .designer-right {
      margin-top: 0 !important;
    }
    
    /* Smallest mobile sizes */
    #label-shape.shape-circle,
    #label-shape.shape-square {
      width: 180px !important;
      height: 180px !important;
    }
    
    #label-shape.shape-rectangle { 
      width: 280px !important;
      height: 130px !important;
    }
    
    /* Mobile icon spacing */
    #label-shape.shape-rectangle.has-icon #label-text {
      padding-left: 55px !important;
      padding-right: 55px !important;
      overflow: visible !important;
    }
    
    #label-shape.shape-rectangle #label-icon {
      width: 50px !important;
      height: 50px !important;
      left: 8px;
    }
    
    #label-shape.shape-circle.has-icon #label-text,
    #label-shape.shape-square.has-icon #label-text {
      padding-top: 55px !important;
      overflow: visible !important;
    }
    
    #label-shape.shape-circle #label-icon,
    #label-shape.shape-square #label-icon {
      width: 50px !important;
      height: 50px !important;
      top: 12px;
    }
    
    .shape-options {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    
    .shape-option {
      flex-direction: row;
      justify-content: flex-start;
      padding: 16px;
    }
    
    /* Ensure no horizontal scrolling on very small screens */
    .easytags-designer {
      overflow-x: hidden;
    }
    
    .designer-grid,
    .designer-left,
    .designer-right {
      overflow-x: hidden;
    }
  }
  
  /* =============================
     SWATCH CONTAINER STYLES - FIXED OVERLAPPING
     ============================= */
  
  .swatch-container {
      display: grid;
      grid-template-rows: repeat(3, 50px);
      grid-auto-flow: column;
      grid-auto-columns: 100px;
      gap: 5px;
      margin: 10px 0 16px;
      padding: 8px 4px;
      overflow-x: auto;
      overflow-y: hidden;
      max-height: 174px;
      scrollbar-width: thin;
      scrollbar-color: #c1c1c1 #f1f1f1;
      scroll-behavior: smooth;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
  }
  
  .swatch-container::-webkit-scrollbar {
      height: 8px;
  }
  
  .swatch-container::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 4px;
  }
  
  .swatch-container::-webkit-scrollbar-thumb {
      background: #c1c1c1;
      border-radius: 4px;
  }
  
  .swatch-container::-webkit-scrollbar-thumb:hover {
      background: #a8a8a8;
  }
  
  /* Individual swatches - FIXED SIZES */
  .swatch {
      width: 100px !important;
      height: 50px !important;
      border: 2px solid #ffffff;
      border-radius: 8px;
      background-size: cover;
      background-position: center;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      flex-shrink: 0;
  }
  
  .swatch:hover {
      transform: translateY(-2px);
      border-color: #0073aa;
      box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
  }
  
  .swatch.color {
      border: 1px solid #ccc;
  }
  
  .swatch.color:hover::after {
      content: '';
      position: absolute;
      top: -4px;
      left: -4px;
      right: -4px;
      bottom: -4px;
      border: 2px solid #0073aa;
      border-radius: 10px;
  }
  
  .swatch.pattern {
      background-size: cover;
      background-repeat: no-repeat;
      border: 2px solid #e5e7eb;
  }
  
  /* ICON SWATCHES - FIXED 50PX */
  .swatch.icon {
      background-size: 70% !important;
      background-repeat: no-repeat !important;
      background-position: center !important;
      border: 2px solid #e5e7eb;
      background-color: #ffffff;
      width: 50px !important;
      height: 50px !important;
  }
  
  .swatch.icon.none {
      background: #f8f9fa !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      font-size: 11px !important;
      color: #666 !important;
      font-weight: 500 !important;
      text-indent: 0 !important;
      background-image: none !important;
      width: 50px !important;
      height: 50px !important;
  }
  
  /* Specific container adjustments */
  #colors-container {
      grid-template-rows: repeat(2, 50px);
      grid-auto-columns: 100px;
  }
  
  #patterns-container {
      grid-template-rows: repeat(2, 50px);
      grid-auto-columns: 100px;
  }
  
  #icons-container {
      grid-template-rows: repeat(2, 50px);
      grid-auto-columns: 50px !important;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
  }
  
  /* =============================
     MOBILE SWATCH FIXES
     ============================= */
  
  @media (max-width: 768px) {
    .swatch-container {
        grid-template-rows: repeat(3, 45px);
        grid-auto-columns: 90px;
        gap: 10px;
        max-height: 155px;
    }
    
    #colors-container,
    #patterns-container {
        grid-template-rows: repeat(2, 45px);
        grid-auto-columns: 90px;
    }
    
    #icons-container {
        grid-template-rows: repeat(2, 45px);
        grid-auto-columns: 45px !important;
        max-height: 155px;
    }
    
    .swatch {
        width: 90px !important;
        height: 45px !important;
    }
    
    .swatch.icon {
        width: 45px !important;
        height: 45px !important;
    }
    
    .swatch.icon.none {
        width: 45px !important;
        height: 45px !important;
        font-size: 10px !important;
    }
  }
  
  @media (max-width: 480px) {
    .swatch-container {
        grid-auto-columns: 80px;
        gap: 8px;
    }
    
    #colors-container,
    #patterns-container {
        grid-auto-columns: 80px;
    }
    
    .swatch {
        width: 80px !important;
        height: 40px !important;
    }
    
    .swatch.icon {
        width: 40px !important;
        height: 40px !important;
        background-size: 65% !important;
    }
    
    .swatch.icon.none {
        width: 40px !important;
        height: 40px !important;
        font-size: 9px !important;
    }
  }
  
  /* =============================
     FONT SWATCHES
     ============================= */
  
  .font-swatches {
      display: grid;
      grid-auto-flow: column;
     /* grid-auto-columns: 100px;*/
      gap: 12px;
      margin: 10px 0 24px;
      padding: 8px 4px;
      overflow-x: auto;
      overflow-y: hidden;
      max-height: none;
      scrollbar-width: thin;
      scrollbar-color: #c1c1c1 #f1f1f1;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
  }
  
  .font-swatches::-webkit-scrollbar {
      height: 8px;
  }
  
  .font-swatches::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 4px;
  }
  
  .font-swatches::-webkit-scrollbar-thumb {
      background: #c1c1c1;
      border-radius: 4px;
  }
  
  .font-swatches::-webkit-scrollbar-thumb:hover {
      background: #a8a8a8;
  }
  
  .font-swatch {
      width: 100px !important;
      height: 50px !important;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid #ccc;
      border-radius: 8px;
      background: #ffffff;
      cursor: pointer;
      transition: all 0.2s ease;
      font-size: 15px;
      text-align: center;
      padding: 0 5px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 500;
      flex-shrink: 0;
  }
  
  .font-swatch:hover {
      border-color: #0073aa;
      background: #f0f8ff;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
  }
  
  @media (max-width: 768px) {
    .font-swatches {
        grid-auto-columns: 90px;
    }
    
    .font-swatch {
        width: 90px !important;
        height: 45px !important;
        font-size: 12px;
    }
  }
  
  @media (max-width: 480px) {
    .font-swatches {
        grid-auto-columns: 80px;
        gap: 8px;
    }
    
    .font-swatch {
        width: 80px !important;
        height: 40px !important;
        font-size: 11px;
    }
  }
  
  /* =============================
     MYNAMETAGS STYLE TABS
     ============================= */
  
  .tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      padding: 0;
      margin: 20px 0 0 0;
      background: transparent;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      justify-content: center;
  }
  
  .tab-button {
      display: flex;
      width: 100%;
      font-weight: 700;
      line-height: 1.2em;
      transition: all .25s ease;
      text-align: center;
      padding: 12px 20px;
      margin-bottom: 3px;
      border: 0.5px solid #bcbcbc;
      border-radius: 12px 12px 0 0;
      justify-content: center;
      align-items: center;
      font-size: 14px;
      cursor: pointer;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 1;
      min-width: 0;
      max-width: 200px;
  }
  
  .tab-button:hover {
      background-color: #fff;
  }
  
  .tab-button.active {
      background-color: white;
      border-bottom: 0.5px solid #fff;
      font-weight: 700;
      font-size: medium;
  }
  
  /* MyNameTags specific colors */
  .tab-button[data-tab="backgrounds"] {
      background-color: #7cd9cc;
  }
  
  .tab-button[data-tab="icons"] {
      background-color: #ffef7d;
  }
  
  .tab-button[data-tab="fonts"] {
      background-color: #f9bc43;
  }
  
  .tab-button[data-tab="shape"] {
      background-color: #f49751;
  }
  
  /* Active state colors - slightly darker */
  .tab-button[data-tab="backgrounds"].active {
      background-color: #6ac9bc;
  }
  
  .tab-button[data-tab="icons"].active {
      background-color: #ffdf6d;
  }
  
  .tab-button[data-tab="fonts"].active {
      background-color: #e9ac33;
  }
  
  .tab-button[data-tab="shape"].active {
      background-color: #e48741;
  }
  
  /* Tab content area */
  .tab-panels {
      width: 100%;
      max-width: 768px;
      background-color: #fff;
      padding: 20px;
      border: 0.5px solid #bcbcbc;
      border-radius: 0 12px 12px 12px;
      margin-top: 0;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      position: relative;
      z-index: 1;
      box-sizing: border-box;
  }
  
  .tab-panel {
      display: none;
      animation: fadeIn 0.3s ease-out;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
  }
  
  .tab-panel.active {
      display: block;
  }
  
  @keyframes fadeIn {
      from {
          opacity: 0;
      }
      to {
          opacity: 1;
      }
  }
  
  .tab-panel h4 {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      margin: 0 0 16px 0;
      padding-bottom: 8px;
      border-bottom: 1px solid #eee;
  }
  
  /* =============================
     RESPONSIVE BEHAVIOR
     ============================= */
  
  /* Desktop - larger padding and font */
  @media (min-width: 768px) {
      .tabs {
          max-width: 768px;
          margin: 20px auto 0;
      }
      
      .tab-button {
          padding: 12px 24px;
          font-size: 14px;
      }
  }
  
  /* Tablet - medium size */
  @media (max-width: 768px) {
      .tabs {
          margin-top: 12px !important;
          width: 100%;
          max-width: 100%;
          padding: 0 18px;
      }
      
      .tab-button {
          padding: 10px 16px;
          font-size: 13px;
          flex: 1;
          min-width: 120px;
      }
      
      .tab-panels {
          padding: 16px !important;
          border-radius: 0 8px 8px 8px;
      }
  }
  
  /* Mobile - 2x2 layout */
  @media (max-width: 600px) {
      .tabs {
          flex-wrap: wrap;
          gap: 6px;
          padding: 0 12px;
      }
      
      .tab-button {
          flex: 0 0 calc(50% - 6px);
          max-width: calc(50% - 6px);
          min-width: 110px;
          padding: 10px 8px;
          font-size: 12px;
          border-radius: 8px;
          margin-bottom: 0;
      }
      
      .tab-panels {
          border-radius: 8px;
          margin-top: 0;
          padding: 12px !important;
      }
      
      .tab-button.active {
          border-bottom: 0.5px solid #bcbcbc;
      }
  }
  
  /* Very small screens - single column */
  @media (max-width: 360px) {
      .tab-button {
          flex: 0 0 100%;
          max-width: 100%;
          font-size: 11px;
          padding: 8px 6px;
      }
  }
  
  /* =============================
     MAINTAIN EXISTING TAB CONTENT STYLES
     ============================= */
  
  /* Ensure proper spacing for tab content */
  .tab-panel h4 {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      margin: 0 0 16px 0;
      padding-bottom: 8px;
      border-bottom: 1px solid #eee;
  }
  
  /* Shape tab specific styles */
  #tab-shape {
      padding: 20px 0;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
  }
  
  #tab-shape h4 {
      text-align: center;
      font-size: 18px;
      color: #111827;
      margin-bottom: 24px;
  }
  
  .shape-options {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 20px;
      margin-top: 16px;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
  }
  
  .shape-option {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      padding: 20px;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.3s ease;
      background: #ffffff;
      text-align: center;
      position: relative;
  }
  
  .shape-option:hover {
      border-color: #0073aa;
      background: #f8faff;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 115, 170, 0.1);
  }
  
  .shape-option input[type="radio"] {
      display: none;
  }
  
  .shape-option input[type="radio"]:checked + .shape-preview {
      /*border-color: #0073aa;*/
      background: #e6f3ff;
  }
  
  .shape-option input[type="radio"]:checked ~ span {
      color: #0073aa;
      font-weight: 600;
  }
  
  .shape-checkmark {
      position: absolute;
      top: -8px;
      right: -8px;
      background: #0073aa;
      color: white;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: bold;
      z-index: 2;
  }
  
  .shape-preview {
      position: relative;
      width: 80px;
      height: 80px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
      background: #f9fafb;
  }
  
  .shape-preview .shape-demo {
      background: #0073aa;
      opacity: 0.7;
      transition: all 0.3s ease;
  }
  
  /* Rectangle shape */
  .shape-preview.rectangle .shape-demo {
      width: 60px;
      height: 40px;
      border-radius: 4px;
  }
  
  /* Circle shape */
  .shape-preview.circle,
  .shape-preview.circle .shape-demo {
      border-radius: 50%;
  }
  
  .shape-preview.circle .shape-demo {
      width: 50px;
      height: 50px;
  }
  
  /* Square shape */
  .shape-preview.square,
  .shape-preview.square .shape-demo {
      border-radius: 8px;
  }
  
  .shape-preview.square .shape-demo {
      width: 50px;
      height: 50px;
  }
  
  .shape-option span {
      font-size: 14px;
      font-weight: 500;
      color: #374151;
      transition: color 0.3s ease;
  }
 /* =============================
   GRID LAYOUT ALTERNATIVE
   ============================= */

.woo-inline-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f9f9f9;
  width: 100%;
  box-sizing: border-box;
}

.easytags-select-container {
  grid-column: 1 / -1;
}

.woo-inline-row .price {
  grid-column: 1;
  justify-self: end;
}

.woo-inline-row .qty {
  grid-column: 2;
}

.woo-inline-row .add_to_cart_button {
  grid-column: 3 / 5;
}

/* Mobile grid layout */
@media (max-width: 768px) {
  .woo-inline-row {
      grid-template-columns: 1fr;
      gap: 12px;
  }
  
  .easytags-select-container {
      grid-column: 1;
      order: 1;
  }
  
  .woo-inline-row .price {
      grid-column: 1;
      order: 2;
      text-align: center;
      justify-self: center;
      padding: 8px 0;
      border-bottom: 1px solid #e0e0e0;
      width: 100%;
  }
  
  .woo-inline-row .qty-add {
      grid-column: 1;
      order: 3;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      width: 100%;
  }
  
  .woo-inline-row .qty {
      grid-column: 1;
      order: 4;
      width: 100%;
  }
  
  .woo-inline-row .add_to_cart_button {
      grid-column: 1;
      order: 5;
      width: 100%;
  }
}

@media (max-width: 480px) {
  .woo-inline-row .qty-add {
      grid-template-columns: 1fr;
      gap: 8px;
  }
  
  .woo-inline-row .qty {
      grid-column: 1;
  }
  
  .woo-inline-row .add_to_cart_button {
      grid-column: 1;
  }
}
  
  /* =============================
     CART & CHECKOUT DISPLAY STYLES
     ============================= */
  
  .easytags-preview-container {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
  }
  
  .easytags-thumbnail-link {
    display: block;
    transition: transform 0.2s ease;
  }
  
  .easytags-thumbnail-link:hover {
    transform: scale(1.05);
  }
  
  .variation {
    display: block !important;
    clear: both;
    margin: 8px 0;
  }
  
  .variation dt {
    float: left;
    clear: left;
    margin-right: 8px;
    font-weight: bold;
    color: #333;
  }
  
  .variation dd {
    margin-left: 0;
    margin-bottom: 8px;
    color: #666;
  }
  
  .easytags-preview-container img {
    max-width: 120px !important;
    height: auto !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    display: block !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .variation dd .color-swatch-display {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
  }
  
  /* =============================
     FONT COLOR SWATCHES - ROUND STYLING
     ============================= */
  
  .color-swatches .swatch {
      border-radius: 50% !important;
      width: 44px !important;
      height: 44px !important;
      border: 2px solid #ccc !important;
      transition: all 0.3s ease !important;
  }
  
  .color-swatches .swatch:hover {
      transform: scale(1.1) !important;
      border-color: #0073aa !important;
      box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3) !important;
  }
  
  /* =============================
     ACCESSIBILITY IMPROVEMENTS
     ============================= */
  
  .swatch:focus,
  .font-swatch:focus,
  .tab-button:focus,
  .woo-inline-row .add_to_cart_button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
  }
  
  /* High contrast mode support */
  @media (prefers-contrast: high) {
    .swatch {
      border-width: 2px;
    }
    
    .tab-button {
      border-width: 2px;
    }
    
    .easytags-preview-container {
      border-left-width: 4px;
    }
  }
  
  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce) {
    .swatch,
    .font-swatch,
    .tab-button,
    .woo-inline-row .add_to_cart_button,
    .easytags-thumbnail-link {
      transition: none;
    }
    
    .tab-panel {
      animation: none;
    }
  }
  /* =============================
     ICON CATEGORY BUTTONS
     ============================= */
  
  .icon-categories {
      display: flex;
      flex-wrap: wrap;
      gap: 0px;
      margin-bottom: 16px;
      padding: 6px 0;
      border-bottom: 1px solid #e5e7eb;
  }
  
  .icon-category-btn {
      background: #e5e7eb;
      border: 1px solid #ccc;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      color: #374151;
      cursor: pointer;
      transition: all 0.2s ease;
      text-transform: capitalize;
  }
  
  .icon-category-btn:hover {
      background: #ffffff;
      border-color: #0073aa;
      color: #0073aa;
      transform: translateY(-1px);
  }
  
  .icon-category-btn.active {
      background: #0073aa;
      border-color: #0073aa;
      
  }
  
  .icon-category-btn.active:hover {
      background: #005a87;
      border-color: #005a87;
  }
  
  /* Icon container adjustments for categories */
  #icons-container {
      min-height: 174px;
  }
  
  .icon-category-title {
      font-size: 14px;
      font-weight: 600;
      color: #374151;
      margin: 0 0 12px 0;
      padding-bottom: 8px;
      border-bottom: 1px solid #f0f0f0;
      text-transform: capitalize;
  }
  
  /* Mobile adjustments for category buttons */
  @media (max-width: 768px) {
      .icon-categories {
          gap: 6px;
      }
      
      .icon-category-btn {
          padding: 6px 12px;
          font-size: 12px;
      }
  }
  
  @media (max-width: 480px) {
      .icon-categories {
          justify-content: center;
      }
      
      .icon-category-btn {
          flex: 1;
          min-width: 0;
          text-align: center;
          padding: 8px 10px;
          font-size: 11px;
      }
  }
  
  /* =============================
     UNIVERSAL CART PREVIEW STYLES - FIXED
     ============================= */
  
  .easytags-design-preview {
      display: block !important;
      visibility: visible !important;
      opacity: 1 !important;
      max-width: 120px !important;
      height: auto !important;
      border: 1px solid #9e9e9e !important;
      border-radius: 8px !important;
      padding: 2px !important;
      background: white !important;
      object-fit: contain !important;
  }
  
 
  
  /* Main cart pages */
  .woocommerce-cart .easytags-design-preview,
  .shop_table .easytags-design-preview,
  .woocommerce-cart-form .easytags-design-preview {
      max-width: 120px !important;
      border: 1px solid #9e9e9e !important;
      border-radius: 8px !important;
  }
  
  /* Checkout pages */
  .woocommerce-checkout .easytags-design-preview,
  .woocommerce-checkout-review-order-table .easytags-design-preview {
      max-width: 120px !important;
      border: 1px solid #9e9e9e !important;
      border-radius: 6px !important;
  }
  
  /* WooCommerce Blocks cart */
  .wc-block-cart-item .easytags-design-preview,
  .wc-block-cart-items__row .easytags-design-preview {
      max-width: 120px !important;
      border: 1px solid #9e9e9e !important;
      border-radius: 8px !important;
  }
  
  
  
  /* =============================
     CART & CHECKOUT TABLE FIXES
     ============================= */
  
  /* Cart table specific fixes */
  .cart_item .easytags-design-preview {
      display: inline-block !important;
      vertical-align: middle !important;
  }
  
  /* Ensure product thumbnails are replaced in main cart */
  .woocommerce-cart-form img.easytags-design-preview {
      display: block !important;
      opacity: 1 !important;
      visibility: visible !important;
  }
  
  /* Checkout review order table */
  .woocommerce-checkout-review-order-table .easytags-design-preview,
  .woocommerce-table--order-details .easytags-design-preview {
      display: inline-block !important;
      vertical-align: middle !important;
      margin-right: 10px !important;
  }
  
  /* Ensure checkout table cells display properly */
  .woocommerce-checkout-review-order-table td.product-name,
  .woocommerce-table--order-details td.product-name {
      display: table-cell !important;
  }
  
  .woocommerce-checkout-review-order-table .product-thumbnail,
  .woocommerce-table--order-details .product-thumbnail {
      display: table-cell !important;
      width: 120px !important;
      vertical-align: middle !important;
      padding: 8px !important;
  }
  
  /* =============================
     HOVER EFFECTS & TRANSITIONS
     ============================= */
  
  .easytags-design-preview:hover {
      transform: scale(1.05) !important;
      border-color: #757575 !important;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
      transition: all 0.3s ease !important;
  }
  
  .easytags-thumbnail-link:hover {
      transform: scale(1.05);
  }
  /* =============================
   ORDER COMPLETE PAGE STYLES
   ============================= */

   .easytags-order-preview {
    margin: 15px 0 !important;
    padding: 15px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    border-left: 4px solid #0073aa !important;
    border: 1px solid #e0e0e0 !important;
}


.easytags-order-preview strong {
  display: block !important;
  margin-bottom: 10px !important;
  color: #333 !important;
  font-size: 14px !important;
}

.easytags-thumbnail-link {
  display: inline-block !important;
  transition: transform 0.3s ease !important;
  margin: 5px 0 !important;
}

.easytags-thumbnail-link:hover {
  transform: scale(1.05) !important;
}

/* Order details page specific */
.woocommerce-order-details .easytags-order-preview {
  background: #fafafa !important;
}

/* My account order view */
.woocommerce-MyAccount-content .easytags-order-preview {
  margin: 10px 0 !important;
}

/* Email preview */
.easytags-email-preview {
  margin: 15px 0 !important;
  padding: 15px !important;
  background: #f8f9fa !important;
  border-radius: 6px !important;
  border: 1px solid #ddd !important;
}
 

/* =============================
   ORDER RECEIVED PAGE STYLES
   ============================= */

   .easytags-order-item-display {
    margin: 5px 0 !important;
    padding: 0 !important;
}

.easytags-design-details {
    margin: 10px 0 !important;
    padding: 10px !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    
    font-size: 14px !important;
}

.easytags-preview-container {
    margin: 10px 0 !important;
    padding: 12px !important;
    background: #fafafa !important;
    border-radius: 8px !important;
    
}

/* Order received page specific */
.woocommerce-order-received .easytags-design-details,
.woocommerce-order-received .easytags-preview-container {
    background: #ffffff !important;
    border: 0px solid #e0e0e0 !important;
}
/* NO WRAPPING, NO TRUNCATION STYLES FOR CHECKOUT LAYOUT */
.easytags-checkout-thumbnail {
  width: auto !important; /* Let content determine width */
  min-width: 160px !important;
  vertical-align: top !important;
  text-align: center !important;
  padding: 12px !important;
}

.checkout-image-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: left !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  min-width: 160px !important; /* Ensure minimum width */
}

.checkout-product-name {
  font-size: 14px !important;
  text-align: left !important;
  line-height: 1.2 !important;
  white-space: nowrap !important; /* Only this - no truncation */
  color: #333 !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

.checkout-product-quantity {
  font-size: 13px !important;
  text-align: center !important;
  color: #666 !important;
  font-weight: 500 !important;
  margin: 0 !important;
  white-space: nowrap !important; /* Only this - no truncation */
}

/* Hide the original product name cell */
td.product-name {
  display: none !important;
}

/* Design preview image */
.easytags-design-preview {
  max-width: 120px !important;
  height: auto !important;
  border: 2px solid #9e9e9e !important;
  border-radius: 6px !important;
  background: white !important;
  padding: 4px !important;
}
/* =============================
   ORDER PAGE - PRODUCT NAME & QUANTITY ON SAME LINE
   ============================= */

/* Force product name and quantity to be on the same line */
.woocommerce-table--order-details .product-name,
.shop_table.order_details .product-name {
    white-space: nowrap !important;
}

/* Make sure the quantity is inline with the product name */
.woocommerce-table--order-details .product-name .product-quantity,
.shop_table.order_details .product-name .product-quantity {
    display: inline !important;
    white-space: nowrap !important;
    margin-left: 8px !important;
    font-weight: bold !important;
}

/* Remove any line breaks between product name and quantity */
.woocommerce-table--order-details .product-name br,
.shop_table.order_details .product-name br {
    display: none !important;
}

/* Ensure the product name container doesn't force wrapping */
.woocommerce-table--order-details td.product-name,
.shop_table.order_details td.product-name {
    white-space: nowrap !important;
    overflow: visible !important;
}
/* =============================
   CHECKOUT PAGE STYLES - NAME & QUANTITY SAME LINE
   ============================= */

/* Checkout table thumbnail cell */
.easytags-checkout-thumbnail {
  width: 120px !important;
  min-width: 120px !important;
  padding: 8px 12px !important;
  vertical-align: middle !important;
  text-align: center !important;
}

/* Container for image and text */
.checkout-image-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
}

/* Text container for name and quantity */
.checkout-product-text {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 100% !important;
}

/* Product name styling */
.checkout-product-name {
  font-size: 12px !important;
  text-align: center !important;
  line-height: 1.2 !important;
  color: #333 !important;
  font-weight: 500 !important;
  max-width: 100px !important;
  word-wrap: break-word !important;
  margin: 0 !important;
}

/* Quantity styling - always on one line */
.checkout-product-quantity {
  font-size: 11px !important;
  text-align: center !important;
  color: #666 !important;
  font-weight: bold !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

/* Design preview image */
.easytags-design-preview {
  max-width: 80px !important;
  height: auto !important;
  border: 2px solid #9e9e9e !important;
  border-radius: 4px !important;
  background: white !important;
  padding: 2px !important;
}

/* Product image */
.checkout-product-image {
  max-width: 80px !important;
  height: auto !important;
  border-radius: 4px !important;
}

/* Placeholder for missing images */
.checkout-product-placeholder {
  width: 80px !important;
  height: 60px !important;
  background: #f5f5f5 !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #999 !important;
  font-size: 11px !important;
  border: 1px dashed #ccc !important;
}

/* Hide original product name to avoid duplication */
.easytags-checkout-thumbnail + td .product-name {
  display: none !important;
}
/* =============================
   EXTRA ATTRIBUTE STYLES
   ============================= */

   .easytags-extra-attribute {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0f8ff;
    
    border-radius: 4px;
    font-size: 17px;
   
    font-weight: 500;
    transition: all 0.3s ease;
}

.easytags-extra-attribute:hover {
    background: #e6f3ff;
    
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .easytags-extra-attribute {
        font-size: 12px;
        padding: 6px 10px;
        margin-top: 6px;
    }
}
/* Responsive Tabs */
.tabs {
  display: flex;
  gap: 5px;
 
  background: #f8fafc;
  
  border-radius: 8px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.tab-button {
  flex: 1;
  padding: 12px 15px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s ease;
  min-width: 120px; /* Minimum width for tabs */
}

.tab-button.active {
  background: white;
  color: #0073aa;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-button:hover {
  color: #0073aa;
}

/* Responsive behavior */
@media (max-width: 768px) {
  .tabs {
      gap: 8px;
      padding: 8px;
  }
  
  .tab-button {
      flex: 0 0 calc(50% - 4px); /* 2 tabs per row with gap */
      min-width: auto; /* Remove min-width restriction */
      padding: 10px 12px;
      font-size: 14px;
  }
}

@media (max-width: 480px) {
  .tabs {
      gap: 6px;
      padding: 6px;
  }
  
  .tab-button {
      flex: 0 0 calc(50% - 3px); /* 2 tabs per row with smaller gap */
      padding: 8px 10px;
      font-size: 13px;
  }
}

/* For very small screens, ensure tabs don't get too small */
@media (max-width: 360px) {
  .tab-button {
      padding: 8px 6px;
      font-size: 12px;
  }
}
.sticky-preview {
  position: sticky !important;
  top: 20px !important;
  align-self: start !important;
  transition: all 0.3s ease !important;
}

@media (max-width: 768px) {
  .sticky-preview {
      position: relative !important;
      top: auto !important;
  }
}
/* Style for disabled line 2 input */
#input-line2:disabled {
  background-color: #f8f9fa !important;
  border-color: #e9ecef !important;
  color: #6c757d !important;
}

/* Help message styling */
.product-type-help {
  font-size: 12px;
  color: #6c757d;
  margin-top: 5px;
  font-style: italic;
}
/* Ensure minimum readable font sizes */
#line2 {
  min-font-size: 16px !important; /* Fallback */
}

/* Force minimum sizes for different screen sizes */
@media (max-width: 768px) {
  #line2 {
      font-size: 16px !important; /* Minimum readable size on mobile */
  }
}

/* Prevent text from becoming too small in any scenario */
#label-text #line2 {
  min-height: 20px; /* Ensure space even if text is small */
}
/* =============================
   PRODUCT SELECTION BELOW TEXT BOXES
   ============================= */

.product-selection-container {
    width: 66.666%;
    max-width: 300px;
    margin: 0 auto 20px auto;
    text-align: center;
}

.easytags-select-container {
    width: 100%;
    margin-bottom: 10px;
}

.product-selection-container .woocommerce-select {
    width: 100% !important;
    padding: 12px 15px;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
    font-size: 16px;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.product-selection-container .woocommerce-select:focus {
    border-color: #0073aa !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.2);
}

.product-selection-container .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #059669;
    margin-top: 8px;
    padding: 8px 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .product-selection-container {
        width: 80%;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    .product-selection-container {
        width: 90%;
    }
    
    .product-selection-container .woocommerce-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}
/* =============================
   PRODUCT SELECTION BELOW TEXT BOXES
   ============================= */

   .product-selection-container {
    width: 66.666%;
    max-width: 300px;
    margin: 0 auto 20px auto;
    text-align: center;
}

.easytags-select-container {
    width: 100%;
    margin-bottom: 10px;
}

.product-selection-container .woocommerce-select {
    width: 100% !important;
    padding: 12px 15px;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
    font-size: 16px;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.product-selection-container .woocommerce-select:focus {
    border-color: #0073aa !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.2);
}

.product-selection-container .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #059669;
    margin-top: 8px;
    padding: 8px 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .product-selection-container {
        width: 80%;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    .product-selection-container {
        width: 90%;
    }
    
    .product-selection-container .woocommerce-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}
/* =============================
   VALIDATION STYLES
   ============================= */

   .easytags-validation-error {
    background: #ffebee !important;
    border: 1px solid #ffcdd2 !important;
    border-radius: 8px !important;
    padding: 15px 20px !important;
    margin: 20px 0 !important;
    color: #c62828 !important;
    font-size: 14px !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.1) !important;
    display: none;
}

.easytags-validation-error .error-message {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    font-weight: 500 !important;
}

/* Shake animation for invalid fields */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.easytags-inputs input.invalid {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
    animation: shake 0.5s ease-in-out !important;
}

/* Required field indicator */
.easytags-inputs input[required] {
    background-image: linear-gradient(45deg, transparent 50%, #dc2626 50%) !important;
    background-position: right 12px center !important;
    background-repeat: no-repeat !important;
    background-size: 6px 6px !important;
}

/* Focus state for better UX */
.easytags-inputs input:focus {
    border-color: #0073aa !important;
    background-color: #ffffff !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .easytags-validation-error {
        padding: 12px 15px !important;
        margin: 15px 0 !important;
        font-size: 13px !important;
    }
}