/* Mobile Layout - v2.3 */
@media (max-width: 768px) {
  /* High z-index to be above accessibility widget (2147483647) */
  #card-customizer-modal {
    z-index: 2147483648 !important;
  }
  #card-customizer-modal .cc-modal-overlay {
    z-index: 2147483648 !important;
  }
  #card-customizer-modal .cc-modal-content {
    z-index: 2147483649 !important;
  }

  /* Modal full screen */
  .cc-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .cc-modal-close {
    top: 12px;
    right: 12px;
    left: auto;
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    border: none;
    z-index: 100;
  }

  /* Hide desktop progress */
  .cc-progress-bar {
    display: none;
  }

  /* Container */
  .cc-container {
    flex-direction: column;
    height: calc(100% - 70px);
    overflow: hidden;
  }

  /* Preview - bigger, no step number */
  .cc-preview-panel {
    width: 100%;
    padding: 40px 15px 15px 15px;
    border: none;
    flex-shrink: 0;
    position: relative;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Remove step number */
  .cc-preview-panel::before {
    display: none !important;
  }

  .cc-preview-badge {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 4px 12px;
    font-size: 10px;
    background: #c9b896;
    color: #5a4a3a;
    z-index: 5;
  }

  /* Bigger preview card */
  .cc-card-preview {
    max-width: 200px;
    width: 50%;
    padding: 6px;
    border-width: 2px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  }

  .cc-product-info {
    display: none;
  }

  /* Form panel */
  .cc-form-panel {
    width: 100%;
    flex: 1;
    padding: 15px;
    padding-bottom: 85px;
    overflow-y: auto;
    background: #fff;
  }

  /* Hide step header and prevent flash */
  .cc-modal.cc-mobile-mode .cc-step-header {
    display: none !important;
  }

  /* Hide sections initially to prevent flash - JS will show the right ones */
  .cc-modal.cc-mobile-mode .cc-section {
    display: none;
  }
  .cc-modal.cc-mobile-mode .cc-field {
    display: none;
  }
  .cc-modal.cc-mobile-mode .cc-alert {
    display: none;
  }
  .cc-modal.cc-mobile-mode .cc-checkbox-field {
    display: none;
  }

  /* Section styling with smooth transitions */
  .cc-section {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes shake {
    0%,
    100% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(-5px);
    }
    75% {
      transform: translateX(5px);
    }
  }

  .cc-shake {
    animation: shake 0.3s ease;
  }

  .cc-section-label {
    font-size: 15px;
    margin-bottom: 12px;
  }
  .cc-section-badge {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  /* Inputs */
  .cc-field input[type="text"],
  .cc-field input[type="number"] {
    padding: 12px;
    font-size: 16px;
    border-radius: 10px;
  }

  /* Upload */
  .cc-upload-area {
    padding: 30px 15px;
    border-radius: 10px;
  }
  .cc-upload-text {
    font-size: 14px;
  }
  .cc-uploaded-preview img {
    max-width: 130px;
    max-height: 130px;
  }
  .cc-alert {
    padding: 10px;
    font-size: 12px;
    margin: 10px 0;
  }

  /* Tabs */
  .cc-tabs {
    gap: 5px;
    padding: 5px 0;
    margin-bottom: 10px;
  }
  .cc-tab {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 15px;
    background: #f3f4f6;
    border-bottom: none;
    white-space: nowrap;
  }
  .cc-tab.active {
    background: var(--cc-primary);
    color: #fff;
  }

  /* Grids */
  .cc-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 200px;
  }
  .cc-grid-item {
    padding: 10px 5px;
    border-width: 2px;
    border-radius: 8px;
  }
  .cc-grid-item img {
    max-width: 30px;
    max-height: 30px;
    margin-bottom: 4px;
  }
  .cc-grid-item-text {
    font-size: 9px;
  }
  .cc-grid-item.selected::after {
    width: 16px;
    height: 16px;
    font-size: 9px;
    top: 3px;
    left: 3px;
  }

  /* Position grid - 2 columns! */
  .cc-position-selector {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
    max-height: none;
  }
  .cc-position-item {
    padding: 16px 10px;
    font-size: 16px;
    font-weight: 600;
  }

  /* Search */
  .cc-search {
    margin-bottom: 10px;
  }
  .cc-search input {
    padding: 10px 35px 10px 12px;
    font-size: 13px;
    border-radius: 20px;
  }

  /* Attributes - 2 columns, bigger */
  .cc-attributes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .cc-attribute-box {
    padding: 20px 15px;
    border-radius: 12px;
  }
  .cc-attribute-input {
    font-size: 36px;
    width: 80px;
  }
  .cc-attribute-label {
    font-size: 14px;
    font-weight: 600;
  }
  .cc-randomise-btn {
    margin-top: 10px;
    padding: 8px 15px;
    font-size: 12px;
  }

  /* Rating */
  .cc-overall-rating {
    padding: 15px 10px;
    border-radius: 10px;
    margin-bottom: 15px;
  }
  .cc-overall-input {
    width: 100px;
    padding: 12px;
    font-size: 36px;
  }
  .cc-suggested-ratings {
    gap: 5px;
    margin-top: 8px;
  }
  .cc-suggested-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Checkbox */
  .cc-checkbox-field {
    padding: 12px;
    margin: 12px 0;
  }
  .cc-checkbox-field input {
    width: 20px;
    height: 20px;
  }
  .cc-checkbox-field label {
    font-size: 12px;
  }

  /* Navigation - fixed bottom */
  .cc-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    flex-direction: row;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    gap: 8px;
  }

  /* Progress bar */
  .cc-navigation::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e5e7eb;
  }
  .cc-navigation::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--cc-primary);
    width: var(--mobile-progress, 11%);
    transition: width 0.3s;
  }

  .cc-mobile-progress {
    position: absolute;
    top: -15px;
    left: var(--mobile-progress, 11%);
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
  }

  .cc-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 25px;
    justify-content: center;
  }
  #cc-btn-back {
    flex: 0.6;
    background: #f3f4f6;
    color: #374151;
    border: none;
    box-shadow: none;
  }
  #cc-btn-next {
    flex: 1.4;
    flex-direction: row-reverse;
    gap: 5px;
  }
  #cc-btn-next:disabled,
  #cc-btn-next[disabled] {
    background: #ccc !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
  }
  #cc-btn-next.cc-shake {
    animation: shake 0.3s ease !important;
  }
  .cc-price-tag {
    font-size: 12px;
  }

  /* Upload toggle */
  .cc-upload-toggle {
    padding: 3px;
    margin-bottom: 10px;
  }
  .cc-toggle-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* =============================================
     CROPPER MODAL - Full screen on mobile
     ============================================= */
  #cc-cropper-modal-fixed {
    z-index: 2147483650 !important;
  }
  #cc-cropper-modal-fixed .cc-modal-overlay {
    z-index: 2147483650 !important;
  }
  .cc-cropper-modal-content {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    z-index: 2147483651 !important;
    overflow-y: auto !important;
  }

  .cc-cropper-header-top {
    padding: 12px 15px;
    padding-top: 45px;
  }
  .cc-cropper-header-top h3 {
    font-size: 18px;
    margin-bottom: 4px;
  }
  .cc-cropper-header-top p {
    font-size: 12px;
  }

  .cc-cropper-container {
    flex-direction: column;
    padding: 10px;
    gap: 8px;
    min-height: calc(100vh - 90px);
    min-height: calc(100dvh - 90px);
  }

  /* Preview side - BIGGER */
  .cc-cropper-preview-side {
    width: 100%;
    flex: 0 0 auto;
    order: 1;
  }
  .cc-cropper-card-wrapper {
    max-width: 160px;
    margin: 0 auto;
    padding: 6px;
  }

  /* Edit side */
  .cc-cropper-edit-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    order: 2;
    min-height: 0;
  }

  .cc-cropper-wrapper {
    flex: 1;
    min-height: 180px;
    max-height: 250px;
  }

  .cc-cropper-tools {
    gap: 10px;
    padding: 10px 0;
    justify-content: center;
  }
  .cc-crop-tool-btn {
    width: 40px;
    height: 40px;
  }
  .cc-crop-tool-btn svg {
    width: 20px;
    height: 20px;
  }

  .cc-cropper-actions {
    gap: 10px;
    padding: 12px 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .cc-cropper-actions .cc-btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .cc-cropper-product-info,
  .cc-preview-label-badge,
  .cc-bg-removed-notice {
    display: none;
  }

  /* Cart modal */
  .cc-cart-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 15px;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
  }
  .cc-cart-body {
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
  }
  #cartPreviewCanvas {
    max-width: 150px;
    margin: 0 auto;
  }
  .cc-cart-actions {
    flex-direction: column;
    gap: 8px;
  }
  .cc-trust-badges {
    flex-direction: column;
    gap: 5px;
  }

  /* Loading overlay */
  .cc-loading-overlay {
    z-index: 2147483650 !important;
  }

  /* Cart modal */
  #cc-cart-modal {
    z-index: 2147483652 !important;
  }
  #cc-cart-modal .cc-cart-overlay {
    z-index: 2147483652 !important;
  }
  #cc-cart-modal .cc-cart-content {
    z-index: 2147483653 !important;
    display: flex;
    flex-direction: column;
    padding-bottom: 0 !important;
  }

  .cc-cart-header {
    flex-shrink: 0;
  }

  .cc-cart-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 15px;
  }

  /* Sticky cart actions */
  .cc-cart-actions {
    position: sticky !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    background: #fff !important;
    padding: 15px 20px !important;
    padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
    border-top: 1px solid #e5e7eb;
    flex-direction: column !important;
    gap: 10px !important;
    z-index: 10;
  }

  .cc-cart-actions .cc-btn {
    width: 100%;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
  }

  /* Primary button - checkout */
  .cc-cart-actions #cc-proceed-checkout {
    background: linear-gradient(135deg, #0b818a 0%, #096d75 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(11, 129, 138, 0.4) !important;
    order: 1;
  }

  /* Secondary button - continue shopping */
  .cc-cart-actions #cc-continue-shopping {
    background: #f8f9fa !important;
    color: #374151 !important;
    border: 2px solid #e5e7eb !important;
    order: 2;
  }

  .cc-trust-badges {
    display: none !important;
  }

  /* =============================================
     BOTTOM SHEET - Club/Country Selection
     ============================================= */
  .cc-bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483654;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s,
      visibility 0.3s;
  }
  .cc-bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .cc-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 2147483655;
    max-height: 85vh;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
  }
  .cc-bottom-sheet.active {
    transform: translateY(0);
  }

  .cc-bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto;
  }

  .cc-bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px 15px;
    border-bottom: 1px solid #eee;
  }
  .cc-bottom-sheet-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
  }
  .cc-bottom-sheet-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cc-bottom-sheet-search {
    padding: 15px 20px;
  }
  .cc-bottom-sheet-search input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    background: #f9fafb
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E")
      12px center / 20px no-repeat;
  }
  .cc-bottom-sheet-search input:focus {
    outline: none;
    border-color: var(--cc-primary);
  }

  .cc-bottom-sheet-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid #eee;
  }
  .cc-bottom-sheet-tabs::-webkit-scrollbar {
    display: none;
  }

  .cc-bottom-sheet-tab {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
  }
  .cc-bottom-sheet-tab.active {
    color: #1e293b;
    border-bottom-color: #1e293b;
  }

  .cc-bottom-sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px));
  }

  .cc-bottom-sheet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .cc-bottom-sheet-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .cc-bottom-sheet-item:hover {
    border-color: #cbd5e1;
    background: #f9fafb;
  }
  .cc-bottom-sheet-item.selected {
    border-color: var(--cc-primary);
    background: rgba(11, 129, 138, 0.05);
  }
  .cc-bottom-sheet-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 2px;
  }
  .cc-bottom-sheet-item span {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
  }

  /* Trigger button for bottom sheet */
  .cc-sheet-trigger {
    width: 100%;
    padding: 16px 20px;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    color: #64748b;
    transition: all 0.2s;
  }
  .cc-sheet-trigger:hover {
    border-color: var(--cc-primary);
    color: var(--cc-primary);
  }
  .cc-sheet-trigger.has-selection {
    border-style: solid;
    border-color: var(--cc-primary);
    background: rgba(11, 129, 138, 0.05);
    justify-content: flex-start;
  }
  .cc-sheet-trigger.has-selection img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }
  .cc-sheet-trigger.has-selection span {
    color: #1e293b;
    font-weight: 600;
  }

  /* Hide original grid in mobile mode for club/country steps */
  .cc-modal.cc-mobile-mode .cc-select-mode .cc-search,
  .cc-modal.cc-mobile-mode .cc-select-mode .cc-tabs,
  .cc-modal.cc-mobile-mode .cc-select-mode .cc-grid {
    display: none !important;
  }
}

/* Search result tag in bottom sheet */
.cc-sheet-tag {
  margin-right: auto;
  background: var(--cc-primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: capitalize;
}

/* No results in bottom sheet */
.cc-no-results-mobile {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.cc-no-results-mobile span {
  display: block;
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.cc-no-results-mobile p {
  font-size: 16px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

/* =============================================
   MOBILE RANDOM BUTTON
   ============================================= */
@media (max-width: 768px) {
  .cc-mobile-random-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: all 0.3s;
    text-align: center;
  }

  .cc-mobile-random-btn:hover,
  .cc-mobile-random-btn:active {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  }

  /* =============================================
     BOTTOM SHEET - FIXED HEIGHT 80vh
     ============================================= */
  .cc-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 2147483655;
    height: 80vh !important;
    max-height: 80vh !important;
    min-height: 80vh !important;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
  }

  .cc-bottom-sheet.active {
    transform: translateY(0);
  }

  .cc-bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 12px auto;
    flex-shrink: 0;
  }

  .cc-bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px 15px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
  }

  .cc-bottom-sheet-search {
    padding: 15px 20px;
    flex-shrink: 0;
  }

  .cc-bottom-sheet-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
  }

  .cc-bottom-sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .cc-bottom-sheet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
    min-height: 100%;
  }

  /* Empty state in bottom sheet */
  .cc-no-results-mobile {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    color: #999;
  }

  .cc-no-results-mobile span {
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
  }

  .cc-no-results-mobile p {
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    margin: 0;
  }

  /* Step 9 - Rating + Checkboxes layout */
  .cc-modal.cc-mobile-mode .cc-overall-rating {
    margin-bottom: 20px;
  }

  .cc-modal.cc-mobile-mode .cc-checkbox-field {
    padding: 15px;
    margin: 10px 0;
    border-radius: 12px;
  }

  .cc-modal.cc-mobile-mode .cc-checkbox-field.first-checkbox {
    margin-top: 0;
  }
}

/* =============================================
   MOBILE RANDOM BUTTON - TEAL COLOR
   ============================================= */
@media (max-width: 768px) {
  .cc-mobile-random-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0b818a 0%, #096d75 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(11, 129, 138, 0.3);
    transition: all 0.3s;
  }

  .cc-mobile-random-btn:hover,
  .cc-mobile-random-btn:active {
    background: linear-gradient(135deg, #096d75 0%, #0b818a 100%);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(11, 129, 138, 0.4);
  }

  /* =============================================
     ALL INPUTS 16px TO PREVENT iOS ZOOM
     ============================================= */
  .cc-field input[type="text"],
  .cc-field input[type="number"],
  .cc-search input,
  .cc-search-input,
  .cc-attribute-input,
  .cc-overall-input,
  #player-name,
  #overall-rating,
  .cc-bottom-sheet-search input,
  input[type="text"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }

  .cc-attribute-input {
    font-size: 32px !important;
  }

  .cc-overall-input,
  #overall-rating {
    font-size: 40px !important;
  }

  /* =============================================
     CART MODAL - FIXED LAYOUT WITH STICKY BUTTONS
     ============================================= */
  #cc-cart-modal {
    z-index: 2147483652 !important;
  }

  #cc-cart-modal .cc-cart-overlay {
    z-index: 2147483652 !important;
  }

  #cc-cart-modal .cc-cart-content {
    z-index: 2147483653 !important;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    padding: 0;
    overflow: hidden;
  }

  /* Cart Header - Fixed at top */
  .cc-cart-header {
    flex-shrink: 0;
    padding: 10px 15px 8px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .cc-cart-header .cc-success-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .cc-cart-header h3 {
    font-size: 17px;
    margin: 0;
  }

  /* Cart Body - Scrollable */
  .cc-cart-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 15px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  /* Cart Preview - Smaller on mobile */
  .cc-cart-preview {
    flex: none;
    max-width: 140px;
    margin: 0 auto;
    padding: 8px;
    border-radius: 10px;
    border-width: 2px;
  }

  .cc-cart-preview canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
  }

  /* Cart Summary - Full details */
  .cc-cart-summary {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Details Grid */
  .cc-cart-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .cc-cart-detail-item {
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
  }

  .cc-detail-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
  }

  .cc-detail-value {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
  }

  /* Attributes in Cart */
  .cc-cart-attributes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #0b818a 0%, #096d75 100%);
    border-radius: 10px;
  }

  .cc-cart-attr-item {
    text-align: center;
    color: white;
  }

  .cc-cart-attr-label {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.85;
    text-transform: uppercase;
  }

  .cc-cart-attr-value {
    font-size: 16px;
    font-weight: 800;
  }

  /* Price Section */
  .cc-cart-price-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
  }

  .cc-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
  }

  .cc-summary-row.cc-total {
    font-size: 18px;
    font-weight: 900;
    padding-top: 12px;
    border-bottom: none;
    color: #0b818a;
  }

  .cc-shipping-note {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    margin-top: 8px;
  }

  /* Cart Actions - Sticky at top (below header) */
  .cc-cart-actions {
    order: -1;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 15px;
    margin: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: row;
    gap: 8px;
    z-index: 10;
    flex-shrink: 0;
  }

  .cc-cart-actions .cc-btn {
    flex: 1;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    text-align: center;
    justify-content: center;
  }

  /* Primary button - checkout */
  .cc-cart-actions #cc-proceed-checkout {
    background: linear-gradient(135deg, #0b818a 0%, #096d75 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(11, 129, 138, 0.4);
    order: 1;
  }

  /* Secondary button - continue shopping */
  .cc-cart-actions #cc-continue-shopping {
    background: #f8f9fa;
    color: #374151;
    border: 2px solid #e5e7eb;
    order: 2;
  }

  /* Hide trust badges on mobile */
  .cc-trust-badges {
    display: none !important;
  }

  /* =============================================
     BOTTOM SHEET - FIXED HEIGHT 80vh
     ============================================= */
  .cc-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 2147483655;
    height: 80vh !important;
    max-height: 80vh !important;
    min-height: 80vh !important;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
  }

  .cc-bottom-sheet.active {
    transform: translateY(0);
  }

  .cc-bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 12px auto;
    flex-shrink: 0;
  }

  .cc-bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px 15px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
  }

  .cc-bottom-sheet-search {
    padding: 15px 20px;
    flex-shrink: 0;
  }

  .cc-bottom-sheet-search input {
    font-size: 16px !important;
  }

  .cc-bottom-sheet-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
  }

  .cc-bottom-sheet-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 15px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .cc-bottom-sheet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
    min-height: 100%;
  }

  /* Empty state in bottom sheet */
  .cc-no-results-mobile {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    color: #999;
  }

  .cc-no-results-mobile span {
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
  }

  .cc-no-results-mobile p {
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    margin: 0;
  }

  /* Step 9 - Rating + Checkboxes layout */
  .cc-modal.cc-mobile-mode .cc-overall-rating {
    margin-bottom: 20px;
  }

  .cc-modal.cc-mobile-mode .cc-checkbox-field {
    padding: 15px;
    margin: 10px 0;
    border-radius: 12px;
  }

  .cc-modal.cc-mobile-mode .cc-checkbox-field.first-checkbox {
    margin-top: 0;
  }
}
/* Mystery Mode - Mobile */
@media (max-width: 768px) {
  .cc-order-notes {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .cc-addon-item { padding: 12px; gap: 10px; }
  .cc-addon-image { width: 48px; height: 48px; }
  .cc-addon-name { font-size: 14px; }
  .cc-addon-desc { font-size: 12px; -webkit-line-clamp: 1; }
  .cc-addon-price { font-size: 14px; }
  .cc-addon-checkbox input[type="checkbox"] { width: 18px; height: 18px; }
}
