/* =========================================
   1. CSS VARIABLES & RESET
   ========================================= */
:root {
    --cm-green: #6ED67D;
    --cm-dark-bg: #141B20;
    --cm-light-bg: #ffffff;
    --cm-text-main: #333333;
    --cm-text-light: #ffffff;
    --cm-border-color: #e0e0e0;
    --cm-border-dark: #333333;
    
    --cm-header-height-desktop: 90px;
    --cm-header-height-mobile: 80px;
    
    --cm-transition: all 0.3s ease;
}

[data-theme="dark"] {
    --cm-light-bg: #1a2228;
    --cm-text-main: #f0f0f0;
    --cm-border-color: #2c353d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--cm-light-bg);
    color: var(--cm-text-main);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* WP Admin Bar Fix */
body.admin-bar .cm-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .cm-header { top: 46px; } }

/* Header Shared */
.cm-header {
    position: sticky; top: 0; z-index: 1000; width: 100%;
    background-color: var(--cm-light-bg);
    border-bottom: 1.5px solid var(--cm-border-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08); 
    transition: background-color 0.3s, opacity 0.3s, top 0.1s;
}
.cm-header.cm-scrolled { background-color: rgba(255, 255, 255, 0.95); }
[data-theme="dark"] .cm-header.cm-scrolled { background-color: rgba(26, 34, 40, 0.95); }

.cm-container {
    max-width: 100%; width: 100%; padding-left: 35px; padding-right: 20px;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}

/* DESKTOP HEADER */
#mainHeader { height: var(--cm-header-height-desktop); display: block; }
.cm-logo { font-size: 24px; font-weight: 800; color: var(--cm-text-main); flex-shrink: 0; }

/* Logo Toggle */
.cm-logo-dark { display: none; }
.cm-logo-light { display: inline-block; }
[data-theme="dark"] .has-dark-version .cm-logo-light { display: none; }
[data-theme="dark"] .has-dark-version .cm-logo-dark { display: inline-block; }

.cm-desktop-nav { flex: 1; display: flex; justify-content: center; margin-left: 100px; }
.cm-desktop-nav ul { display: flex; align-items: center; gap: 25px; list-style-type: none !important; }
.cm-nav-item { position: relative; font-weight: 500; cursor: pointer; padding: 10px 0; list-style: none; }
.cm-nav-item:hover { color: var(--cm-green); }

.cm-dropdown {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: var(--cm-light-bg); border: 1px solid var(--cm-border-color);
    min-width: 180px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-radius: 8px;
    opacity: 0; visibility: hidden; transition: var(--cm-transition); padding: 10px 0; z-index: 1100;
}
.cm-nav-item:hover .cm-dropdown { opacity: 1; visibility: visible; top: 100%; }
.cm-dropdown a { display: block; padding: 10px 20px; font-size: 14px; white-space: nowrap; }
.cm-dropdown a:hover { background-color: rgba(0,0,0,0.05); color: var(--cm-green); }

.cm-desktop-actions { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.cm-icon-btn { position: relative; font-size: 18px; cursor: pointer; background: none; border: none; color: var(--cm-text-main); padding: 5px; }

/* CART & BUTTONS */
.cm-cart-wrapper { position: relative; }
.cm-cart-dropdown {
    position: absolute; top: 40px; right: -10px; width: 300px;
    background-color: var(--cm-light-bg); border: 1px solid var(--cm-border-color);
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); z-index: 2000; padding: 15px; cursor: default;
}
.cm-cart-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
@media screen and (max-width: 480px) { .cm-cart-dropdown { width: 280px; right: -40px; } }
.cm-cart-item { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--cm-border-color); }
.cm-cart-item img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; background-color: #f0f0f0; }
.cm-cart-item-details h5 { font-size: 14px; margin-bottom: 4px; }
.cm-cart-item-details span { font-size: 12px; color: #666; }
.cm-cart-total { display: flex; justify-content: space-between; font-weight: bold; margin-bottom: 15px; font-size: 14px; }
.cm-cart-actions { display: flex; flex-direction: column; gap: 10px; }
.cm-btn-cart { text-align: center; padding: 8px; border-radius: 4px; font-size: 13px; font-weight: 600; transition: 0.2s; }
.cm-btn-view-cart { background: transparent; border: 1px solid var(--cm-border-dark); color: var(--cm-text-main); }
.cm-btn-view-cart:hover { background: rgba(0,0,0,0.05); }
.cm-btn-checkout { background: var(--cm-green); color: #000; border: none; }
.cm-btn-checkout:hover { opacity: 0.9; }
.cm-cart-count { position: absolute; top: -5px; right: -8px; background-color: var(--cm-green); color: #000; font-size: 10px; font-weight: bold; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; pointer-events: none; }

.cm-btn { padding: 10px 24px; border-radius: 50px; font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--cm-transition); display: inline-block; }
.cm-btn-login { background-color: #fff; color: #000; border: 1px solid #000; }
.cm-btn-login:hover { background-color: #f0f0f0; }
.cm-btn-start { background-color: var(--cm-green); color: #000; border: 1px solid #000; }
.cm-btn-start:hover { opacity: 0.9; }

/* MOBILE HEADER */
#mobileHeader { height: var(--cm-header-height-mobile); display: none; }
.cm-mobile-header-elements { display: flex; width: 100%; height: 100%; align-items: center; justify-content: space-between; }
.cm-hamburger { font-size: 22px; cursor: pointer; padding: 10px; }
.cm-mobile-left, .cm-mobile-right { display: flex; align-items: center; gap: 15px; }
.cm-mobile-drawer {
    position: fixed; top: var(--cm-header-height-mobile); left: 0; width: 300px;
    height: calc(100vh - var(--cm-header-height-mobile)); background-color: var(--cm-light-bg);
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    z-index: 999; border-right: 1px solid var(--cm-border-color); overflow-y: auto; padding: 20px;
}
body.admin-bar .cm-mobile-drawer { top: calc(var(--cm-header-height-mobile) + 46px); height: calc(100vh - (var(--cm-header-height-mobile) + 46px)); }
.cm-mobile-drawer.active { transform: translateX(0); }
.cm-mobile-user-actions { position: relative; }
.cm-user-dropdown {
    position: absolute; top: 40px; right: 0; background: var(--cm-light-bg);
    border: 1px solid var(--cm-border-color); border-radius: 8px; width: 160px;
    display: none; flex-direction: column; box-shadow: 0 5px 15px rgba(0,0,0,0.2); padding: 10px; z-index: 1002;
}
.cm-user-dropdown.active { display: flex; }
.cm-user-dropdown li { list-style: none; margin: 0; padding: 0; }
.cm-user-dropdown a { display: block; padding: 10px; font-size: 14px; border-bottom: 1px solid var(--cm-border-color); }
.cm-user-dropdown a:last-child, .cm-user-dropdown li:last-child a { border-bottom: none; }

/* SEARCH MODAL */
.cm-search-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); z-index: 3000; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s; backdrop-filter: blur(5px);
}
.cm-search-modal.active { opacity: 1; visibility: visible; }
.cm-search-box {
    background-color: var(--cm-light-bg); width: 90%; max-width: 600px; border-radius: 12px;
    padding: 30px; position: relative; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.cm-search-modal.active .cm-search-box { transform: scale(1); }
.cm-search-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cm-search-title { font-size: 18px; font-weight: 600; }
.cm-close-modal { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--cm-text-main); padding: 5px; }
.cm-search-input-wrapper { position: relative; margin-bottom: 20px; }
.cm-search-input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #999; }
.cm-search-input { width: 100%; padding: 15px 15px 15px 45px; border: 2px solid var(--cm-border-color); border-radius: 8px; font-size: 16px; background: transparent; color: var(--cm-text-main); outline: none; transition: border-color 0.3s; }
.cm-search-input:focus { border-color: var(--cm-green); }
.cm-recent-searches h6 { font-size: 12px; color: #999; text-transform: uppercase; margin-bottom: 10px; }
.cm-tag { display: inline-block; background: rgba(0,0,0,0.05); padding: 6px 12px; border-radius: 20px; font-size: 13px; margin-right: 8px; margin-bottom: 8px; cursor: pointer; transition: 0.2s; }
.cm-tag:hover { background: var(--cm-green); color: #000; }

/* CONTENT & FOOTER */
.cm-content { padding: 3px; min-height: 60vh; width: 100%; max-width: 1400px; margin: 0 auto; }
.cm-footer { background-color: #141B20; color: #ffffff; padding: 60px 0 20px 0; margin-top: 50px; }
.cm-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.cm-mobile-menu-row { display: contents; } /* Fix Desktop Grid */
.cm-footer-brand h2 { font-size: 24px; margin-bottom: 15px; }
.cm-footer-desc { font-size: 14px; color: #ccc; margin-bottom: 20px; line-height: 1.5; }
.cm-app-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cm-app-btn { background: #2b353d; border: 1px solid #444; padding: 8px 16px; border-radius: 6px; color: #fff; font-size: 13px; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.cm-app-btn:hover { background: #3a4750; }
.cm-footer-col h4 { font-size: 16px; margin-bottom: 20px; color: #fff; }
.cm-footer-col ul li { margin-bottom: 12px; }
.cm-footer-col ul li a { color: #9ca3af; font-size: 14px; transition: 0.3s; }
.cm-footer-col ul li a:hover { color: var(--cm-green); }
.cm-footer-divider { height: 1px; background-color: rgba(255,255,255,0.15); width: 97%; margin: 40px auto 20px auto; }
.cm-footer-bottom { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; font-size: 13px; color: #9ca3af; }
.cm-footer-links, .cm-social-icons { display: flex; gap: 20px; }
.cm-social-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #444; display: flex; align-items: center; justify-content: center; color: #fff; transition: 0.3s; }
.cm-social-btn:hover { border-color: var(--cm-green); color: var(--cm-green); }

/* MOBILE STICKY FOOTER */
#mobileStickyFooter { display: none; position: fixed; bottom: 0; left: 0; width: 100%; height: 65px; background-color: var(--cm-light-bg); border-top: 1px solid var(--cm-border-color); z-index: 2000; justify-content: space-around; align-items: center; padding: 0 10px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.cm-sticky-icon { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--cm-text-main); font-size: 20px; width: 20%; }
.cm-sticky-icon.active, .cm-sticky-icon.current-menu-item, .cm-sticky-icon.current_page_item { color: var(--cm-green); }
.cm-sticky-icon:hover { color: var(--cm-green); }
.cm-sticky-icon-center { font-size: 24px; background-color: var(--cm-green); color: #000; width: 45px; height: 45px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 5px; }
.cm-sticky-icon-center:hover { opacity: 0.9; color: #000; }

/* THEME SWITCHER */
.cm-theme-toggle { position: fixed; bottom: 90px; right: 30px; width: 50px; height: 50px; background-color: var(--cm-dark-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 2000; border: 2px solid var(--cm-green); color: #fff; transition: transform 0.3s; }
[data-theme="dark"] .cm-theme-toggle { background-color: #fff; color: #000; }
.cm-theme-toggle:hover { transform: scale(1.1); }

/* LOGIN PAGE STYLES */
.cm-login-container { display: flex; min-height: 100vh; background-color: var(--cm-light-bg); }
.cm-login-left { width: 50%; padding: 60px; display: flex; flex-direction: column; justify-content: center; background-color: var(--cm-light-bg); }
.cm-login-form-wrapper { max-width: 400px; width: 100%; margin: 0 auto; }
.cm-login-header h2 { font-size: 28px; margin-bottom: 30px; color: var(--cm-text-main); font-weight: 700; }
.cm-login-field { margin-bottom: 20px; }
.cm-login-field label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--cm-text-main); }
.cm-login-input { width: 100%; padding: 12px 15px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; background-color: #fff; color: #000; }
.cm-login-btn { width: 100%; background-color: #40834B; color: white; padding: 14px; border: none; border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer; margin-bottom: 15px; transition: opacity 0.3s; }
.cm-login-btn:hover { opacity: 0.9; }
.cm-create-btn { width: 100%; background-color: transparent; color: var(--cm-text-main); padding: 14px; border: 1px solid var(--cm-text-main); border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer; text-align: center; display: block; }
.cm-login-helper-links { margin-top: 20px; font-size: 13px; color: var(--cm-text-main); }
.cm-login-helper-links a { text-decoration: underline; color: var(--cm-text-main); }
.cm-login-msg { margin-top: 15px; font-size: 14px; font-weight: 500; }
.cm-login-msg.error { color: #d93025; }
.cm-login-msg.success { color: #188038; }
.cm-password-group { position: relative; }
.cm-toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 12px; font-weight: 600; color: #333; }

.cm-login-right { width: 50%; background-color: #f7f7f7; background-size: cover; background-position: center; position: relative; display: flex; align-items: center; justify-content: center; padding: 40px; overflow: hidden; }
.cm-hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.cm-login-hero-content { background: rgba(255, 255, 255, 0.9); padding: 40px; border-radius: 12px; max-width: 480px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: relative; z-index: 1; }
.cm-login-hero-title { font-size: 32px; font-weight: 800; margin-bottom: 20px; color: #000; line-height: 1.2; }
.cm-login-hero-sub { font-size: 16px; line-height: 1.5; color: #444; margin-bottom: 20px; }

/* MEDIA QUERIES */
/* Tablet (<992px) */
@media screen and (max-width: 992px) {
    #mainHeader { display: none !important; }
    #mobileHeader { display: block !important; }
    .cm-container { padding-left: 23px; }
    .cm-mobile-left { gap: 17px; }
    .cm-hamburger { padding: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
    .cm-footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 20px; text-align: left; }
    .cm-mobile-menu-row { display: flex; flex-direction: column; gap: 20px; } /* 3-Col layout */
    .cm-footer-brand { grid-column: span 1; }
    .tablet-col-group { display: flex; flex-direction: column; gap: 20px; }
    
    /* Login Page Responsive */
    .cm-login-container { flex-direction: column; }
    .cm-login-left, .cm-login-right { width: 100%; min-height: auto; }
    .cm-login-left { padding: 40px 20px; order: 1; }
    .cm-login-right { padding: 40px 20px; order: 2; min-height: 400px; }
}

/* Mobile (<768px) */
@media screen and (max-width: 767px) {
    #mobileStickyFooter { display: flex; }
    .cm-footer { padding-bottom: 80px; }
    .cm-footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; text-align: left; }
    .cm-footer-brand { grid-column: 1 / -1; text-align: center; display: flex; flex-direction: column; align-items: center; }
    .cm-app-btns { justify-content: center; }
    .cm-mobile-menu-row { display: contents; } /* 2-Col layout flow */
    .cm-footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    .cm-social-icons { order: 1; margin-bottom: 10px; }
    .cm-footer-links { order: 2; margin-bottom: 10px; }
    .cm-copyright { order: 3; }
}