@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --primary: #a855f7; /* Vibrant Purple */
  --primary-hover: #9333ea;
  --primary-light: #f3e8ff;
  
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --navbar-bg: #0b0f19;
  
  --text-main: #111111;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --border-light: #e2e8f0;
  
  /* Geometry */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 40px -10px rgba(0,0,0,0.12);
  
  /* Animation */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Restored and Namespaced Global Resets */
:where(#storefront-wrapper) * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

:where(#storefront-wrapper) *::-webkit-scrollbar {
  display: none;
}

#storefront-wrapper {

    /* Base Globals */
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Typography */
:where(#storefront-wrapper) h1, 
:where(#storefront-wrapper) h2, 
:where(#storefront-wrapper) h3, 
:where(#storefront-wrapper) h4, 
:where(#storefront-wrapper) h5, 
:where(#storefront-wrapper) h6 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

:where(#storefront-wrapper) a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

:where(#storefront-wrapper) ul {
  list-style: none;
}

/* Common Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Restored and Namespaced Buttons */
#storefront-wrapper .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 0;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 8px;
}

#storefront-wrapper .btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px 0 rgba(168, 85, 247, 0.39);
}

#storefront-wrapper .btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

#storefront-wrapper .btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

#storefront-wrapper .btn-outline:hover {
  border-color: var(--text-main);
  background-color: var(--bg-color);
}


/* Navbar */
.navbar {
  background-color: var(--navbar-bg);
  color: var(--text-inverse);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#storefront-wrapper .nav-brand {
  display: flex;
  flex-direction: column;
}

#storefront-wrapper .nav-brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 1px;
}

#storefront-wrapper .nav-brand-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a1a1aa;
}

#storefront-wrapper .nav-links {
  display: flex;
  gap: 32px;
}

#storefront-wrapper .nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
  position: relative;
}

#storefront-wrapper .nav-links a:hover {
  color: var(--primary);
}

#storefront-wrapper .nav-links a.active {
  color: var(--primary);
}

#storefront-wrapper .nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

#storefront-wrapper .nav-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

#storefront-wrapper .nav-actions i {
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}

#storefront-wrapper .nav-actions i:hover {
  color: var(--primary);
}

.cart-icon {
  position: relative;
}
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: bold;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero-section {
  padding: 60px 0;
  flex: 1;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  padding-right: 20px;
}

.hero-subtitle {
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  display: block;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.feature-list {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  color: var(--text-main);
}

.feature-icon {
  color: var(--primary);
  font-size: 1rem;
  background: var(--primary-light);
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-actions {
  display: flex;
  gap: 16px;
}



/* Widget: Left Toolbar */
.widget-toolbar {
  background: #ffffff;
  border-right: 1px solid var(--border-light);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px 4px;
  width: 64px;
  border-radius: 0;
  color: var(--text-muted);
  transition: var(--transition);
}

.tool-btn i {
  font-size: 1.5rem;
}

.tool-btn span {
  font-size: 0.65rem;
  font-weight: 500;
}

.tool-btn:hover {
  background: var(--bg-color);
  color: var(--text-main);
}

.tool-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Widget: Center Canvas */
.widget-canvas-area {
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
  position: relative;
}

.canvas-header {
  display: flex;
  justify-content: flex-start;
}

.back-link {
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.canvas-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-mockup-placeholder {
  width: 100%;
  max-width: 350px;
  aspect-ratio: 1;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Skeleton Loading (for dynamic JS injection later) */
.skeleton {
  background: #eee;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  border-radius: 5px;
  background-size: 200% 100%;
  animation: 1.5s shine linear infinite;
}
@keyframes shine {
  to {
    background-position-x: -200%;
  }
}

.product-mockup-placeholder img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15));
  transition: transform 0.4s ease;
}

.product-logo-overlay {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: auto;
}

.canvas-thumbnails {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: auto;
}

.thumb-btn {
  width: 50px;
  height: 50px;
  border-radius: 0;
  border: 2px solid transparent;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumb-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.thumb-btn.active {
  border-color: var(--primary);
}

/* Widget: Right Panel */
.widget-right-panel {
  padding: 24px;
  background: var(--card-bg);
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.custom-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: 0;
  font-family: inherit;
  font-size: 0.9rem;
  appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256'%3E%3Cpath fill='%2364748b' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32z'/%3E%3C/svg%3E") no-repeat right 14px center;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.custom-select:focus {
  border-color: var(--primary);
}

.color-swatches {
  display: flex;
  gap: 10px;
}

.color-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}

.color-btn:hover {
  transform: scale(1.1);
}

.color-btn.active {
  border-color: var(--primary);
  padding: 2px;
  background-clip: content-box;
}

.color-btn.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.6rem;
}

.deco-toggle {
  display: flex;
  background: var(--bg-color);
  border-radius: 0;
  padding: 4px;
}

.deco-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 0;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.deco-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

.design-info-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.design-info-text strong {
  display: block;
  font-size: 0.85rem;
}

.design-info-text span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.edit-icon-btn {
  background: var(--bg-color);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.edit-icon-btn:hover {
  background: var(--border-light);
  color: var(--text-main);
}

.widget-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-block {
  width: 100%;
  padding: 14px;
}

/* Popular Products Section */
#storefront-wrapper .popular-section {
  padding: 60px 0;
  background-color: var(--card-bg);
}

#storefront-wrapper .section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 40px;
}

#storefront-wrapper .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

#storefront-wrapper .product-card {
  background: var(--bg-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

#storefront-wrapper .product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
  border-color: var(--border-light);
}

#storefront-wrapper .product-placeholder {
  width: 100px;
  height: 100px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--border-light);
}

#storefront-wrapper .product-card span {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: space-between;
}

#storefront-wrapper .product-card span i {
  color: var(--text-muted);
  transition: color 0.3s;
}

#storefront-wrapper .product-card:hover span i {
  color: var(--primary);
}

#storefront-wrapper .product-card.more-card {
  background: var(--primary-light);
  justify-content: center;
  color: var(--primary);
}

#storefront-wrapper .product-card.more-card i {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

/* Tab Animations */
#storefront-wrapper .nav-links a {
    position: relative;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color 0.2s ease;
}
#storefront-wrapper .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #a855f7;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}
#storefront-wrapper .nav-links a.active {
    color: #a855f7;
}
#storefront-wrapper .nav-links a.active::after {
    transform: scaleX(1);
}

/* Marquee Animation */
#storefront-wrapper .marquee-content {
    animation: scroll-left 25s linear infinite;
}
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

#storefront-wrapper .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(168,85,247,0.15) !important;
    border-color: #a855f7 !important;
}

/* Hero Demo Widget Animation */
.applied-logo { animation: apply-logo 6s infinite ease-in-out; }
.scanner-laser { animation: scan-laser 6s infinite linear; }
.before-state { animation: before-fade 6s infinite ease-in-out; }
.after-state { animation: after-fade 6s infinite ease-in-out; }
.product-base img { animation: product-fade 6s infinite ease-in-out; }
.product-base i { animation: shirt-color 6s infinite ease-in-out; transition: color 0.3s; }

@keyframes apply-logo {
    0%, 40% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    45%, 85% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    95%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}
@keyframes scan-laser {
    0%, 20% { top: -10%; opacity: 0; }
    25% { opacity: 1; }
    45% { top: 90%; opacity: 1; }
    50%, 100% { top: 90%; opacity: 0; }
}
@keyframes before-fade {
    0%, 40% { opacity: 1; }
    45%, 100% { opacity: 0; }
}
@keyframes after-fade {
    0%, 40% { opacity: 0; }
    45%, 85% { opacity: 1; }
    95%, 100% { opacity: 0; }
}
@keyframes shirt-color {
    0%, 40% { color: #f8fafc; }
    45%, 85% { color: #f1f5f9; }
    95%, 100% { color: #f8fafc; }
}
@keyframes product-fade {
    0%, 5% { opacity: 0; }
    10%, 90% { opacity: 1; }
    95%, 100% { opacity: 0; }
}

/* Mobile Navigation Dropdown */
.mobile-nav-dropdown {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 18px 36px;
    gap: 18px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.mobile-nav-dropdown.active {
    display: flex;
    animation: slideDown 0.3s ease forwards;
}

.mobile-nav-dropdown a {
    font-size: 1.0rem;
    font-weight: 600;
    color: #111;
    text-align: left;
    padding: 9px 0;
    border-bottom: 1px solid #eee;
}
.mobile-nav-dropdown a:last-child {
    border-bottom: none;
}
.mobile-nav-dropdown a:hover, .mobile-nav-dropdown a.active {
    color: var(--primary);
}

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

@media (max-width: 768px) {
    #storefront-wrapper .nav-links {
        display: none !important;
    }
    #storefront-wrapper .mobile-menu-toggle {
        display: flex !important;
    }
    .navbar .navbar-inner {
        padding: 0 20px !important;
    }
}

/* Hero Section Responsive Layout */
.hero-section {
    padding: 80px 40px;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.hero-inner {
    max-width: 1400px;
    width: 100%;
    display: flex;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 20px;
    }
    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .hero-inner .hero-text-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-inner .hero-buttons {
        justify-content: center;
    }
}


/* Category Grid Layout */
.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr 1fr;
    }
}

