/* ==========================================================================
   TIER-1 SUBHEADER STYLESHEET (DARK LUXURY THEME)
   Location: css/sub-header.css
   ========================================================================== */

.tc-sub-header,
.tc-sub-header *,
.tc-sub-pricing-value,
.tc-sub-pricing-value del,
.tc-sub-pricing-value ins,
.tc-sub-pricing-value .amount {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.tc-sub-header {
    position: fixed;
    top: 75px !important; 
    left: 0;
    width: 100%;
    height: 70px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 0 28px;
    background: rgba(23, 20, 28, 0.94) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6) !important;
    z-index: 998; 
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, top 0.3s ease;
}

body.has-top-contact-bar .tc-sub-header {
    top: 75px !important; 
}

.tc-sub-header.hidden {
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
}

.tc-sub-header.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.tc-sub-header-left {
    display: flex;
    align-items: center;
}

.tc-sub-pricing-col {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tc-sub-pricing-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}

/* Diagonal Red Strikethrough Logic for Price */
.tc-sub-pricing-value {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 21px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.tc-sub-pricing-value .amount { 
    color: #ffffff !important; 
}

.tc-sub-pricing-value del { 
    position: relative !important;
    color: #94a3b8 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin-right: 8px !important;
    padding: 0 4px !important;
    display: inline-block !important;
}

.tc-sub-pricing-value del::after {
    content: '' !important;
    position: absolute !important;
    left: -2px !important;
    right: -2px !important;
    top: 50% !important;
    height: 2.5px !important;
    background: #ef4444 !important;
    border-radius: 2px !important;
    transform: translateY(-50%) rotate(-15deg) !important;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.45) !important;
    pointer-events: none !important;
}

.tc-sub-pricing-value ins { 
    text-decoration: none !important; 
    color: #10b981 !important; 
    font-size: 21px !important;
    font-weight: 800 !important;
}

.tc-sub-pricing-value ins .amount {
    color: #10b981 !important;
}

/* Right Side Action Buttons */
.tc-sub-header-right {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 6px;
}

/* Clear Circle Buttons */
.tc-sub-circle-btn {
    background-color: transparent !important;
    border: none !important;
    color: #cbd5e1;
    cursor: pointer;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    margin: 0;
    outline: none;
}

.tc-sub-circle-btn:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff;
}

.tc-sub-share-svg, .tc-dots-svg {
    width: 20px;
    height: 20px;
    color: inherit;
    transition: transform 0.2s ease;
}

.tc-sub-circle-btn:hover .tc-sub-share-svg {
    transform: scale(1.1);
}

.tc-sub-fav-btn:hover,
.tc-sub-fav-btn.active {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

/* Dropdown */
.tc-sub-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    margin-right: 6px;
}

.tc-sub-dropdown-menu {
    position: absolute;
    top: 65px;
    right: 0;
    background-color: #17141c;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1100;
}

.tc-sub-dropdown-wrapper.open .tc-sub-dropdown-menu,
.tc-sub-dropdown-wrapper:hover .tc-sub-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tc-sub-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background-color: #17141c;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
    z-index: 1;
}

.tc-sub-dropdown-item {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 14.5px;
    font-weight: 700;
    width: 100%;
    box-sizing: border-box;
    background-color: transparent;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.1s ease;
}

.tc-sub-dropdown-item svg {
    width: 19px;
    height: 19px;
    color: #7c3aed;
    stroke: currentColor;
    flex-shrink: 0;
}

.tc-sub-dropdown-item:hover {
    background-color: #7c3aed;
    color: #ffffff;
}

.tc-sub-dropdown-item:hover svg {
    color: #ffffff;
    stroke: #ffffff;
}

.tc-sub-dropdown-item.text-amber { color: #f5bc00; }
.tc-sub-dropdown-item.text-amber svg { color: #f5bc00; stroke: #f5bc00; }
.tc-sub-dropdown-item.text-amber:hover { background-color: #f5bc00; color: #ffffff; }
.tc-sub-dropdown-item.text-amber:hover svg { color: #ffffff; stroke: #ffffff; }
.tc-sub-dropdown-divider { height: 1px; background-color: rgba(255, 255, 255, 0.08); margin: 4px 0; width: 100%; }

/* Primary Action Button */
.tc-sub-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100% !important;
    padding: 0 42px;
    background-color: var(--primary-color, #7c3aed);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 0;
    text-decoration: none !important;
    flex-shrink: 0;
}

.tc-sub-add-btn:hover:not(:disabled) { background-color: #6d28d9; }
.tc-sub-btn-text { color: #ffffff; font-size: 14.5px; font-weight: 800; text-transform: uppercase; }
.tc-sub-add-btn.in-cart { background-color: #10b981; }
.tc-sub-add-btn.in-cart:hover { background-color: #059669; }
.tc-sub-add-btn:disabled { background-color: rgba(255, 255, 255, 0.06); cursor: not-allowed; }
.tc-sub-add-btn:disabled .tc-sub-btn-text { color: #64748b; }
.tc-sub-spinner { width: 20px; height: 20px; animation: tc-sub-spin 0.8s linear infinite; }
@keyframes tc-sub-spin { 100% { transform: rotate(360deg); } }

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .tc-sub-header {
        top: 65px !important;
        height: 60px !important;
        padding-left: 14px;
    }
    body.has-top-contact-bar .tc-sub-header {
        top: 65px !important;
    }
    .tc-sub-pricing-label { display: none; }
    .tc-sub-pricing-value { font-size: 17px; }
    .tc-sub-header-right { gap: 2px; }
    
    /* Perfect Circle Button Alignment */
    .tc-sub-circle-btn { width: 38px; height: 38px; flex: 0 0 38px; }
    .tc-sub-circle-btn svg, .tc-dots-svg { width: 20px; height: 20px; margin: 0 auto; display: block; }
    
    .tc-sub-dropdown-wrapper { margin-right: 0; }
    .tc-sub-add-btn { padding: 0 16px; border-left: none; }
    .tc-sub-btn-text { font-size: 13px; }
}

@media screen and (max-width: 380px) {
    .tc-sub-btn-text { display: none; } 
    .tc-sub-add-btn { padding: 0 20px; }
}