/**
 * Create By: Vino Sonsua / @vinosonsua
 */

/* ============================================
   CSS Variables
============================================ */
:root {
    --cm-bg: #0a0a0f;
    --cm-bg-card: #12121a;
    --cm-bg-card-hover: #18182a;
    --cm-bg-elevated: #1a1a2e;
    --cm-bg-input: #0e0e16;
    --cm-border: rgba(255, 255, 255, 0.06);
    --cm-border-hover: rgba(255, 255, 255, 0.12);
    --cm-text: #f0f0f5;
    --cm-text-secondary: #9ca3af;
    --cm-text-muted: #6b7280;
    --cm-accent: #ec4899;
    --cm-accent-hover: #f472b6;
    --cm-accent-glow: rgba(236, 72, 153, 0.15);
    --cm-green: #22c55e;
    --cm-green-bg: rgba(34, 197, 94, 0.12);
    --cm-red: #ef4444;
    --cm-red-bg: rgba(239, 68, 68, 0.12);
    --cm-yellow: #f59e0b;
    --cm-yellow-bg: rgba(245, 158, 11, 0.12);
    --cm-blue: #3b82f6;
    --cm-blue-bg: rgba(59, 130, 246, 0.12);
    --cm-radius: 12px;
    --cm-radius-sm: 8px;
    --cm-radius-lg: 16px;
    --cm-radius-pill: 999px;
    --cm-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    --cm-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --cm-transition: all 0.25s ease;
}

/* ============================================
   Global / Body Overrides
============================================ */
body {
    background: var(--cm-bg) !important;
    color: var(--cm-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   Section Spacing
============================================ */
.cm-section {
    padding: 28px 0 40px;
}

.cm-section-lg {
    padding: 60px 0;
}

/* ============================================
   Navbar
============================================ */
.cm-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    padding: 14px 0;
    transition: var(--cm-transition);
    background: transparent;
}

.cm-navbar.scrolled {
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cm-border);
    padding: 10px 0;
}

.cm-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cm-navbar-logo {
    text-decoration: none !important;
}

.cm-navbar-logo img {
    height: 34px;
    width: auto;
}

.cm-navbar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-sm);
    color: var(--cm-text);
    font-size: 1.4rem;
    padding: 6px 10px;
    cursor: pointer;
    transition: var(--cm-transition);
    line-height: 1;
}

.cm-navbar-toggle:hover {
    border-color: var(--cm-accent);
    color: var(--cm-accent);
}

.cm-navbar-collapse {
    display: flex;
    align-items: center;
}

.cm-navbar-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cm-navbar-menu li a {
    display: block;
    padding: 8px 16px;
    color: var(--cm-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none !important;
    border-radius: var(--cm-radius-sm);
    transition: var(--cm-transition);
}

.cm-navbar-menu li a:hover {
    color: var(--cm-text) !important;
    background: rgba(255, 255, 255, 0.04);
}

.cm-navbar-menu li a.active {
    color: var(--cm-accent) !important;
    background: var(--cm-accent-glow);
}

/* ============================================
   Page Header / Breadcrumb
============================================ */
.cm-page-header {
    padding: 100px 0 40px;
    position: relative;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.6) 0%, transparent 100%);
}

.cm-page-header .cm-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cm-text);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.cm-page-header .cm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cm-page-header .cm-breadcrumb a {
    color: var(--cm-text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--cm-transition);
}

.cm-page-header .cm-breadcrumb a:hover {
    color: var(--cm-accent);
}

.cm-page-header .cm-breadcrumb .cm-sep {
    color: var(--cm-text-muted);
    font-size: 0.75rem;
}

.cm-page-header .cm-breadcrumb .cm-current {
    color: var(--cm-accent);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================
   Hero
============================================ */
.cm-hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    background: radial-gradient(ellipse at 50% 0%, rgba(236, 72, 153, 0.06) 0%, transparent 60%);
}

.cm-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--cm-text);
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.cm-hero-subtitle {
    font-size: 1.1rem;
    color: var(--cm-text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cm-hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================
   Card Base
============================================ */
.cm-card {
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    padding: 24px;
    transition: var(--cm-transition);
}

.cm-card:hover {
    border-color: var(--cm-border-hover);
}

.cm-card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cm-border);
}

.cm-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cm-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cm-card-subtitle {
    font-size: 0.8rem;
    color: var(--cm-text-muted);
    margin-top: 4px;
}

/* ============================================
   Product Card (jbalwikobra-style)
============================================ */
.product-card-modern {
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    overflow: hidden;
    transition: var(--cm-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--cm-shadow-lg);
    border-color: var(--cm-border-hover);
}

/* Image wrapper */
.product-card-modern .product-image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--cm-bg);
}

.product-card-modern .product-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.product-card-modern:hover .product-image {
    transform: scale(1.04);
}

/* Sold overlay */
.product-card-modern .product-sold-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.product-card-modern .product-sold-overlay span {
    background: var(--cm-red);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: var(--cm-radius-pill);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content */
.product-card-modern .product-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Category tags row */
.product-card-modern .product-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.product-card-modern .product-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--cm-radius-pill);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.6;
}

.product-card-modern .product-tag.tag-category {
    background: var(--cm-accent-glow);
    color: var(--cm-accent);
}

.product-card-modern .product-tag.tag-category img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
}

.product-card-modern .product-tag.tag-status {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.product-card-modern .product-tag.tag-available {
    background: var(--cm-green-bg);
    color: var(--cm-green);
}

.product-card-modern .product-tag.tag-pending {
    background: var(--cm-yellow-bg);
    color: var(--cm-yellow);
}

.product-card-modern .product-tag.tag-sold {
    background: var(--cm-red-bg);
    color: var(--cm-red);
}

/* Title */
.product-card-modern .product-title,
.product-card-modern .product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cm-text);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price */
.product-card-modern .product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cm-text);
    margin-top: auto;
}

.product-card-modern .product-price .currency {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--cm-text-muted);
    margin-right: 2px;
}

/* Action button */
.product-card-modern .product-action {
    margin-top: 4px;
}

/* ============================================
   Bento Grid (homepage products)
============================================ */
.cm-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ============================================
   About Text
============================================ */
.cm-about-text {
    color: var(--cm-text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 700px;
}

/* ============================================
   Buttons
============================================ */
.cm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--cm-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--cm-transition);
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.4;
}

.cm-btn:hover,
.cm-btn:focus,
.cm-btn:active {
    text-decoration: none !important;
}

a.cm-btn:hover {
    color: inherit;
}

.cm-btn.cm-btn-primary {
    background: var(--cm-accent);
    color: #fff !important;
}

.cm-btn.cm-btn-primary:hover,
.cm-btn.cm-btn-primary:focus {
    background: var(--cm-accent-hover);
    color: #fff !important;
    box-shadow: 0 4px 20px var(--cm-accent-glow);
}

.cm-btn.cm-btn-green {
    background: var(--cm-green);
    color: #fff !important;
}

.cm-btn.cm-btn-green:hover,
.cm-btn.cm-btn-green:focus {
    background: #16a34a;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
}

.cm-btn.cm-btn-outline {
    background: transparent;
    color: var(--cm-text) !important;
    border: 1px solid var(--cm-border-hover);
}

.cm-btn.cm-btn-outline:hover,
.cm-btn.cm-btn-outline:focus {
    border-color: var(--cm-accent);
    color: var(--cm-accent) !important;
    background: var(--cm-accent-glow);
}

.cm-btn.cm-btn-ghost {
    background: var(--cm-bg-elevated);
    color: var(--cm-text-secondary) !important;
    border: 1px solid var(--cm-border);
}

.cm-btn.cm-btn-ghost:hover,
.cm-btn.cm-btn-ghost:focus {
    color: var(--cm-text) !important;
    border-color: var(--cm-border-hover);
}

.cm-btn.cm-btn-disabled,
.cm-btn.cm-btn-disabled:hover,
.cm-btn.cm-btn-disabled:focus,
.cm-btn:disabled,
.cm-btn:disabled:hover,
.cm-btn:disabled:focus,
.cm-btn[disabled],
.cm-btn[disabled]:hover,
.cm-btn[disabled]:focus,
span.cm-btn.cm-btn-disabled,
span.cm-btn-disabled.cm-btn-sm,
span.cm-btn-disabled.cm-btn-block {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.35) !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
    opacity: 0.5 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none !important;
    filter: grayscale(100%);
}

.cm-btn.cm-btn-sm,
.cm-btn-sm {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
}

.cm-btn.cm-btn-lg,
.cm-btn-lg {
    padding: 16px 32px !important;
    font-size: 0.95rem !important;
}

.cm-btn.cm-btn-block,
.cm-btn-block {
    width: 100% !important;
    display: flex !important;
    text-align: center !important;
    justify-content: center !important;
}

.cm-btn i {
    font-size: 0.9em;
}

/* ============================================
   Category Filter Tabs (horizontal pills)
============================================ */
.cm-filter-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cm-filter-tabs::-webkit-scrollbar {
    display: none;
}

.cm-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-pill);
    color: var(--cm-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--cm-transition);
    white-space: nowrap;
    text-decoration: none !important;
}

.cm-filter-tab:hover {
    border-color: var(--cm-border-hover);
    color: var(--cm-text);
    background: var(--cm-bg-card-hover);
    text-decoration: none !important;
}

.cm-filter-tab.active {
    background: var(--cm-accent);
    border-color: var(--cm-accent);
    color: #fff;
    font-weight: 600;
}

.cm-filter-tab img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

/* ============================================
   Product Count Badge
============================================ */
.cm-product-count {
    font-size: 0.9rem;
    color: var(--cm-text-muted);
    font-weight: 500;
    padding: 8px 0;
}

.cm-product-count strong {
    color: var(--cm-text);
}

/* ============================================
   Filter Bar (search + selects)
============================================ */
.cm-filter-bar {
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.cm-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.cm-filter-item {
    flex: 1;
    min-width: 180px;
}

.cm-filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

/* ============================================
   Form Inputs
============================================ */
.cm-input,
.cm-select {
    width: 100%;
    padding: 11px 16px;
    background: var(--cm-bg-input);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-sm);
    color: var(--cm-text);
    font-size: 0.875rem;
    transition: var(--cm-transition);
    outline: none;
}

.cm-input::placeholder {
    color: var(--cm-text-muted);
}

.cm-input:focus,
.cm-select:focus {
    border-color: var(--cm-accent);
    box-shadow: 0 0 0 3px var(--cm-accent-glow);
}

.cm-input.is-valid {
    border-color: var(--cm-green);
}

.cm-input.is-invalid {
    border-color: var(--cm-red);
}

.cm-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.cm-form-group {
    margin-bottom: 18px;
}

.cm-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cm-text-secondary);
    margin-bottom: 6px;
}

/* Search wrapper */
.cm-search-wrap {
    position: relative;
}

.cm-search-wrap input {
    padding-right: 48px;
}

.cm-search-wrap button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--cm-accent);
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    color: #fff;
    cursor: pointer;
    transition: var(--cm-transition);
    font-size: 0.85rem;
    font-weight: 600;
}

.cm-search-wrap button:hover {
    background: var(--cm-accent-hover);
}

/* ============================================
   Gallery
============================================ */
.cm-gallery {
    border-radius: var(--cm-radius);
    overflow: hidden;
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
}

.cm-gallery .cm-gallery-main {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
}

.cm-gallery .cm-gallery-nav {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.cm-gallery .cm-gallery-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: var(--cm-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.cm-gallery .cm-gallery-nav button:hover {
    background: var(--cm-accent);
    color: #fff;
    border-color: var(--cm-accent);
}

.cm-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.cm-gallery-thumbs img {
    width: calc(33.333% - 6px);
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--cm-radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--cm-transition);
    opacity: 0.6;
}

.cm-gallery-thumbs img:hover,
.cm-gallery-thumbs img.active {
    border-color: var(--cm-accent);
    opacity: 1;
}

/* ============================================
   Info Rows (transaction details, product info)
============================================ */
.cm-info-card {
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    padding: 20px;
}

.cm-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--cm-border);
}

.cm-info-row:last-child {
    border-bottom: none;
}

.cm-info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cm-text-secondary);
    font-size: 0.85rem;
}

.cm-info-label i {
    color: var(--cm-accent);
    width: 18px;
    text-align: center;
}

.cm-info-value {
    color: var(--cm-text);
    font-weight: 500;
    font-size: 0.9rem;
    text-align: right;
}

/* ============================================
   Status Badge
============================================ */
.cm-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--cm-radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
}

.cm-status-pending {
    background: var(--cm-yellow-bg);
    color: var(--cm-yellow);
}

.cm-status-success {
    background: var(--cm-green-bg);
    color: var(--cm-green);
}

.cm-status-failed {
    background: var(--cm-red-bg);
    color: var(--cm-red);
}

/* ============================================
   Tabs
============================================ */
.cm-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--cm-border);
    padding-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.cm-tabs::-webkit-scrollbar {
    display: none;
}

.cm-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--cm-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--cm-transition);
    white-space: nowrap;
}

.cm-tab-btn:hover {
    color: var(--cm-text-secondary);
}

.cm-tab-btn.active {
    color: var(--cm-accent);
    border-bottom-color: var(--cm-accent);
}

/* ============================================
   Alerts
============================================ */
.cm-alert {
    padding: 14px 18px;
    border-radius: var(--cm-radius-sm);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.cm-alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.cm-alert-info {
    background: var(--cm-blue-bg);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--cm-blue);
}

.cm-alert-warning {
    background: var(--cm-yellow-bg);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--cm-yellow);
}

.cm-alert-danger {
    background: var(--cm-red-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--cm-red);
}

.cm-alert-success {
    background: var(--cm-green-bg);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--cm-green);
}

/* ============================================
   Order Summary (sticky sidebar)
============================================ */
.cm-order-summary {
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    padding: 24px;
    position: sticky;
    top: 100px;
}

.cm-summary-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cm-text);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cm-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cm-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--cm-border);
}

.cm-summary-row:last-of-type {
    border-bottom: none;
}

.cm-summary-label {
    color: var(--cm-text-secondary);
    font-size: 0.85rem;
}

.cm-summary-value {
    color: var(--cm-text);
    font-weight: 500;
    font-size: 0.9rem;
}

.cm-summary-total {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px solid var(--cm-accent);
}

.cm-summary-total .cm-summary-label {
    font-weight: 600;
    color: var(--cm-text);
    font-size: 0.95rem;
}

.cm-summary-total .cm-summary-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cm-accent);
}

/* ============================================
   Pagination
============================================ */
.cm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    padding: 16px 0;
}

.cm-page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-sm);
    color: var(--cm-text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--cm-transition);
    text-decoration: none !important;
    padding: 0 14px;
}

.cm-page-btn:hover {
    border-color: var(--cm-accent);
    color: var(--cm-accent);
    text-decoration: none !important;
}

.cm-page-btn.active {
    background: var(--cm-accent);
    border-color: var(--cm-accent);
    color: #fff;
    font-weight: 600;
}

/* ============================================
   Empty State
============================================ */
.cm-empty {
    text-align: center;
    padding: 60px 20px;
}

.cm-empty i {
    font-size: 3.5rem;
    color: var(--cm-text-muted);
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

.cm-empty h4 {
    color: var(--cm-text);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.cm-empty p {
    color: var(--cm-text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* ============================================
   Category Card (homepage)
============================================ */
.cm-category-card {
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    overflow: hidden;
    transition: var(--cm-transition);
    height: 100%;
    text-decoration: none !important;
    display: block;
}

.cm-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cm-shadow-lg);
    border-color: var(--cm-accent);
    text-decoration: none !important;
}

.cm-category-card .cm-cat-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--cm-border);
}

.cm-category-card .cm-cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(236, 72, 153, 0.2);
    flex-shrink: 0;
}

.cm-category-card .cm-cat-name {
    color: var(--cm-text);
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 2px;
}

.cm-category-card .cm-cat-count {
    color: var(--cm-text-muted);
    font-size: 0.8rem;
}

.cm-category-card .cm-cat-preview {
    position: relative;
}

.cm-category-card .cm-cat-preview img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.cm-category-card .cm-cat-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    display: flex;
    justify-content: flex-end;
}

/* ============================================
   Section Header
============================================ */
.cm-section-header {
    margin-bottom: 32px;
}

.cm-section-header .cm-subtitle {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cm-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.cm-section-header .cm-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cm-text);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.cm-section-header .cm-desc {
    color: var(--cm-text-secondary);
    font-size: 0.9rem;
    max-width: 500px;
}

/* ============================================
   Price Highlight
============================================ */
.cm-price-box {
    background: var(--cm-accent-glow);
    border: 1px solid rgba(236, 72, 153, 0.15);
    border-radius: var(--cm-radius-sm);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cm-price-label {
    color: var(--cm-text-secondary);
    font-size: 0.85rem;
}

.cm-price-value {
    color: var(--cm-accent);
    font-size: 1.5rem;
    font-weight: 700;
}

/* ============================================
   TOS Content
============================================ */
.cm-tos {
    background: var(--cm-bg-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    padding: 32px;
}

.cm-tos-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cm-border);
}

.cm-tos-icon {
    width: 44px;
    height: 44px;
    background: var(--cm-accent-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cm-tos-icon i {
    font-size: 1.3rem;
    color: var(--cm-accent);
}

.cm-tos h1,
.cm-tos h2,
.cm-tos h3,
.cm-tos h4,
.cm-tos h5,
.cm-tos h6 {
    color: var(--cm-text);
    margin-top: 20px;
    margin-bottom: 12px;
}

.cm-tos p {
    color: var(--cm-text-secondary);
    line-height: 1.8;
    margin-bottom: 14px;
}

.cm-tos ul,
.cm-tos ol {
    color: var(--cm-text-secondary);
    padding-left: 20px;
    margin-bottom: 14px;
}

.cm-tos li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.cm-tos a {
    color: var(--cm-accent);
}

.cm-tos blockquote {
    border-left: 3px solid var(--cm-accent);
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
    color: var(--cm-text-muted);
}

/* ============================================
   Form Validation
============================================ */
.cm-form-error {
    color: var(--cm-red);
    font-size: 0.78rem;
    margin-top: 5px;
    display: none;
}

.cm-form-error.active {
    display: block;
}

/* ============================================
   Utility
============================================ */
.text-accent {
    color: var(--cm-accent) !important;
}

.cm-secure-note {
    text-align: center;
    color: var(--cm-text-muted);
    font-size: 0.78rem;
    margin-top: 16px;
}

/* ============================================
   Footer
============================================ */
.cm-footer {
    background: var(--cm-bg-card);
    border-top: 1px solid var(--cm-border);
    padding: 48px 0 0;
    margin-top: 60px;
}

.cm-footer-logo {
    margin-bottom: 16px;
}

.cm-footer-logo img {
    height: 32px;
    width: auto;
}

.cm-footer-desc {
    color: var(--cm-text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    margin: 0;
}

.cm-footer-heading {
    color: var(--cm-text);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cm-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cm-footer-links li {
    margin-bottom: 8px;
}

.cm-footer-links li a {
    color: var(--cm-text-muted);
    font-size: 0.85rem;
    text-decoration: none !important;
    transition: var(--cm-transition);
}

.cm-footer-links li a:hover {
    color: var(--cm-accent) !important;
    padding-left: 4px;
}

.cm-footer-bottom {
    margin-top: 32px;
    padding: 20px 0;
    border-top: 1px solid var(--cm-border);
}

.cm-footer-bottom p {
    color: var(--cm-text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* ============================================
   Theme Overrides (base template conflicts)
============================================ */
/* Ensure base a:hover doesn't bleed into custom components */
.cm-navbar-menu li a:hover,
.cm-footer-links li a:hover,
.cm-page-header .cm-breadcrumb a:hover,
a.cm-btn:hover,
a.cm-filter-tab:hover,
a.cm-page-btn:hover,
a.cm-category-card:hover {
    color: inherit;
}

.footer-area,
.footer-area .footer-bottom {
    border-color: var(--cm-border) !important;
}

.btn-main>span {
    color: #fff !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--cm-bg);
}

::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cm-accent);
}

/* ============================================
   Back to Top
============================================ */
.back-to-top {
    position: fixed;
    left: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    background: var(--cm-accent);
    color: #fff !important;
    border: none;
    border-radius: var(--cm-radius-sm);
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 44px;
    font-size: 20px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 16px var(--cm-accent-glow);
    transition: var(--cm-transition);
    animation: cmBttPulse 2.5s infinite ease-in-out;
}

.back-to-top:hover {
    background: var(--cm-accent-hover);
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 24px var(--cm-accent-glow);
}

@keyframes cmBttPulse {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ============================================
   Responsive
============================================ */
@media (max-width: 991px) {
    .cm-navbar {
        padding: 10px 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--cm-border);
    }

    .cm-navbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        font-size: 1.5rem;
    }

    .cm-navbar-collapse {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--cm-border);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
        padding: 8px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
    }

    .cm-navbar-collapse.show {
        display: block;
        max-height: 500px;
        padding: 8px 0 12px;
    }

    .cm-navbar-menu {
        flex-direction: column;
        gap: 0;
        padding: 0 16px;
    }

    .cm-navbar-menu li a {
        padding: 14px 16px;
        border-radius: var(--cm-radius-sm);
        border-bottom: none;
        margin: 2px 0;
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--cm-text-secondary);
        transition: var(--cm-transition);
    }

    .cm-navbar-menu li a:hover {
        background: rgba(255, 255, 255, 0.06);
        color: var(--cm-text) !important;
    }

    .cm-navbar-menu li a.active {
        background: var(--cm-accent-glow);
        color: var(--cm-accent) !important;
        font-weight: 600;
    }

    .cm-navbar-menu li:last-child a {
        border-bottom: none;
    }

    .cm-hero-title {
        font-size: 2rem;
    }

    .cm-hero-subtitle {
        font-size: 1rem;
    }

    .cm-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .cm-page-header .cm-page-title {
        font-size: 1.75rem;
    }

    .cm-filter-item {
        min-width: calc(50% - 6px);
    }

    .cm-order-summary {
        position: static;
        margin-top: 20px;
    }
}

@media (max-width: 767px) {
    .cm-section {
        padding: 20px 0 30px;
    }

    .cm-hero {
        padding: 110px 0 40px;
    }

    .cm-hero-title {
        font-size: 1.75rem;
    }

    .cm-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .cm-hero-actions .cm-btn {
        width: 100%;
        max-width: 280px;
    }

    .cm-page-header {
        padding: 80px 0 32px;
    }

    .cm-page-header .cm-page-title {
        font-size: 1.5rem;
    }

    .cm-filter-item {
        min-width: 100%;
    }

    .cm-section-header .cm-title {
        font-size: 1.35rem;
    }

    .cm-tos {
        padding: 20px;
    }

    .cm-card {
        padding: 18px;
    }

    .cm-info-card {
        padding: 16px;
    }

    .product-card-modern .product-content {
        padding: 14px;
    }

    .cm-gallery-thumbs img {
        width: calc(33.333% - 5px);
    }

    .cm-footer {
        padding: 32px 0 0;
        margin-top: 40px;
    }

    .cm-footer .row>div {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .cm-filter-tabs {
        gap: 6px;
    }

    .cm-filter-tab {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    .cm-bento-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .product-card-modern .product-image {
        aspect-ratio: 3/2;
    }

    .product-card-modern .product-content {
        padding: 10px;
        gap: 6px;
    }

    .product-card-modern .product-name,
    .product-card-modern .product-title {
        font-size: 0.8rem;
    }

    .product-card-modern .product-price {
        font-size: 0.95rem;
    }

    .cm-hero-title {
        font-size: 1.5rem;
    }

    .cm-hero-subtitle {
        font-size: 0.9rem;
    }
}