/**
 * CaseNab Theme - Single Product Page Styles
 *
 * @package CaseNab
 */

/* ============================================
   IMAGE ZOOM LENS
   ============================================ */
.zoom-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.zoom-container.zoomed {
    cursor: zoom-out;
}

.zoom-container img.zoomed-img,
.zoom-container svg.zoomed-svg {
    transform: scale(2);
    transition: transform 0.3s ease;
}

.zoom-container svg,
.zoom-container img {
    transition: transform 0.3s ease;
}

/* ============================================
   THUMBNAIL ACTIVE RING
   ============================================ */
.thumb-active {
    border: 2px solid #3C402B;
    box-shadow: 0 0 0 1px #3C402B;
}

.gallery-thumb {
    transition: all 0.2s ease;
}

.gallery-thumb:hover {
    border-color: rgba(60, 64, 43, 0.4);
}

/* ============================================
   QUANTITY BUTTONS
   ============================================ */
.qty-btn {
    transition: all 0.15s ease;
}

.qty-btn:active {
    transform: scale(0.92);
}

/* ============================================
   COLOR SELECTOR
   ============================================ */
.color-opt {
    transition: all 0.2s ease;
    cursor: pointer;
}

.color-opt:hover {
    transform: scale(1.15);
}

.color-opt.active {
    box-shadow: 0 0 0 3px #F9FAFB, 0 0 0 5px #3C402B;
}

/* ============================================
   MATERIAL SELECTOR
   ============================================ */
.material-btn {
    transition: all 0.2s ease;
}

.material-btn:hover {
    background-color: #3C402B;
    color: #C4E456;
}

.material-btn.active {
background-color: #3C402B !important;
color: #C4E456 !important;
}

/* ============================================
   TAB UNDERLINE ANIMATION
   ============================================ */
.tab-btn {
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 3px;
    background: #3C402B;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.tab-btn.active::after {
    width: 100%;
}

.tab-btn.active {
    color: #3C402B;
}

/* ============================================
   RATING BAR ANIMATION
   ============================================ */
.rating-bar-fill {
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
FAQ ACCORDION
============================================ */
.faq-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-content {
	max-height: 500px;
}

.faq-item.open .faq-arrow {
	transform: rotate(180deg);
}

.faq-arrow {
	transition: transform 0.3s ease;
}

/* ============================================
   STICKY MOBILE BAR
   ============================================ */
.sticky-bar {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-bar.visible {
    transform: translateY(0);
}

/* ============================================
   COUNTDOWN PULSE
   ============================================ */
@keyframes countPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.count-pulse {
    animation: countPulse 1s ease-in-out infinite;
}

/* ============================================
   BADGE SHIMMER
   ============================================ */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.badge-shimmer {
    background: linear-gradient(90deg, #C4E456 0%, #e8ff9a 50%, #C4E456 100%);
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

/* ============================================
SHARE MENU
============================================ */
.share-menu {
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	transition: all 0.25s ease;
}

.share-menu:not(.hidden) {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* ============================================
   IMAGE GALLERY SLIDE
   ============================================ */
.gallery-track {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-panel {
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-panel {
    transform: scale(1) translateY(0);
}

/* ============================================
   FLOAT ANIMATION
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.float-anim {
    animation: float 4s ease-in-out infinite;
}

/* ============================================
   PRODUCT CARD HOVER
   ============================================ */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.product-card .product-overlay {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

/* ============================================
   STOCK INDICATOR PULSE
   ============================================ */
.stock-pulse {
    animation: stockPulse 2s ease-in-out infinite;
}

@keyframes stockPulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* ============================================
   WISHLIST BUTTON
   ============================================ */
.wishlist-btn {
    transition: all 0.2s ease;
}

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

.wishlist-btn.active svg {
    fill: #f44336;
    stroke: #f44336;
}

/* ============================================
   TRUST FEATURES GRID
   ============================================ */
.trust-feature {
    transition: all 0.2s ease;
}

.trust-feature:hover {
    border-color: #3C402B;
    background-color: rgba(60, 64, 43, 0.02);
}

/* ============================================
   SELLER REPLY BOX
   ============================================ */
.seller-reply {
    border-right: 4px solid #3C402B;
    background-color: rgba(60, 64, 43, 0.05);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 1024px) {
    .sticky-bar {
        display: block;
    }
    
    .desktop-actions {
        display: none;
    }
}

@media (min-width: 1024px) {
    .sticky-bar {
        display: none;
    }
    
    .desktop-actions {
        display: flex;
    }
}

/* ============================================
   PRODUCT INFO STICKY
   ============================================ */
@media (min-width: 1024px) {
    .product-summary-sticky {
        position: sticky;
        top: 100px;
    }
}

/* ============================================
   SCROLLBAR HIDE
   ============================================ */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   PERSIAN NUMERAL SUPPORT
   ============================================ */
.persian-num {
    font-feature-settings: 'ss01';
}

/* ============================================
   BUTTON STATES
   ============================================ */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   QUICK SPECS SIDEBAR
   ============================================ */
.quick-specs-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #E5E5E5;
    font-size: 0.75rem;
}

.quick-specs-item:last-child {
    border-bottom: none;
}

.quick-specs-label {
    color: #999999;
}

.quick-specs-value {
    font-weight: 700;
    color: #333333;
}

/* ============================================
   ADD TO CART BUTTON VARIANTS
   ============================================ */
.btn-add-cart {
    background-color: #3C402B;
    color: #C4E456;
    transition: all 0.2s ease;
    box-shadow: 0 10px 25px rgba(60, 64, 43, 0.2);
}

.btn-add-cart:hover {
    background-color: #333333;
}

.btn-add-cart:active {
    transform: scale(0.98);
}

.btn-quick-buy {
    background-color: #C4E456;
    color: #3C402B;
    transition: all 0.2s ease;
    box-shadow: 0 10px 25px rgba(196, 228, 86, 0.3);
}

.btn-quick-buy:hover {
    background-color: #d4f066;
}

/* ============================================
   REVIEW HELPFUL BUTTON
   ============================================ */
.review-helpful {
    transition: all 0.2s ease;
}

.review-helpful:hover {
    color: #3C402B;
    text-decoration: underline;
}
