:root {
    --pd-radius-lg: 12px;
    --pd-radius: 10px;
    --pd-shadow: 0 6px 18px rgba(0,0,0,0.06);
    --pd-shadow-sm: 0 3px 10px rgba(0,0,0,0.05);
    --pd-spacing-sm: .5rem;
    --pd-spacing-md: .75rem;
    --pd-spacing-lg: 1rem;
    --pd-spacing-xl: 1.25rem;
    --pd-transition: all .25s ease;

    /* Brand colors */
    --primary-color: #2d3194;
    --primary-dark: #252a7a;
    --primary-light: #3f47c6;
    --danger-color: #ed1925;
    --warning-color: #fbbf24;
    --info-color: #0ea5e9;
}

/* ==============================
   Product Image
============================== */
.product-image-container {
    position: relative;
    background: var(--bg-color);
    border-radius: var(--pd-radius-lg);
    overflow: hidden;
    box-shadow: var(--pd-shadow);
    margin-bottom: var(--pd-spacing-xl);
    animation: fadeInUp .45s ease-out;
}
#image-slider { position: relative; width: 100%; }
.product-image {
    width: 100%; height: 100%; object-fit: cover;
    transition: var(--pd-transition); cursor: zoom-in;
}
.product-image:hover { transform: scale(1.03); }

/* Image Navigation */
.image-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.92); border: none;
    width: 40px; height: 40px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--text-color);
    cursor: pointer; transition: var(--pd-transition); z-index: 10;
}
.image-nav:hover {
    background: var(--primary-color); color: #fff;
    transform: translateY(-50%) scale(1.06);
}
.image-nav.prev { left: 12px; }
.image-nav.next { right: 12px; }

/* Thumbnails */
.image-thumbnails {
    display: flex; gap: 8px; margin-top: 12px;
    overflow-x: auto; padding: 8px 0;
}
.thumbnail {
    width: 70px; height: 70px; object-fit: cover;
    border-radius: var(--pd-radius); cursor: pointer;
    transition: var(--pd-transition); border: 2px solid transparent;
    flex-shrink: 0;
}
.thumbnail:hover, .thumbnail.active {
    border-color: var(--primary-color); transform: scale(1.03);
}

/* ==============================
   Product Info
============================== */
.product-info {
    padding: var(--pd-spacing-xl);
    background: var(--bg-color);
    border-radius: var(--pd-radius-lg);
    box-shadow: var(--pd-shadow-sm);
    height: fit-content;
    position: sticky;
    top: 84px;
    animation: slideInRight .5s ease-out;
}
.product-title {
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.25;
    font-size: clamp(1.25rem, 3vw, 2rem);
}

/* Price */
.product-price {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    margin-bottom: var(--pd-spacing-lg);
    padding: .75rem .9rem;
    background: var(--bg-secondary);
    border-radius: var(--pd-radius);
    border-left: 3px solid var(--primary-color);
}
.current-price { color: var(--accent) !important; font-weight: 700; font-size: 1.5rem; }
.original-price { font-size: 1.05rem; }
.discount-badge { padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: .8rem; }

/* ==============================
   Product Attributes
============================== */
.product-attributes {
    background: var(--bg-secondary);
    padding: var(--pd-spacing-lg);
    border-radius: var(--pd-radius-lg);
    margin-bottom: var(--pd-spacing-lg);
    border: 1px solid var(--border-color);
}
.attribute-group { margin-bottom: var(--pd-spacing-lg); }
.attribute-group:last-child { margin-bottom: 0; }
.attribute-group label {
    color: var(--text-color); font-weight: 600;
    margin-bottom: .35rem; display: block; font-size: 1rem;
}
.attribute-values { display: flex; flex-wrap: wrap; gap: 8px; }

.attribute-value-btn {
    border: 2px solid var(--border-color);
    background: var(--bg-color); color: var(--text-color);
    padding: 8px 12px; border-radius: var(--pd-radius);
    transition: var(--pd-transition); font-weight: 500;
    position: relative; overflow: hidden; font-size: .95rem;
}
.attribute-value-btn:hover {
    border-color: var(--primary-color); color: var(--primary-color);
    transform: translateY(-1px); box-shadow: var(--pd-shadow-sm);
}
.attribute-value-btn.active {
    background: var(--primary-color); border-color: var(--primary-color); color:#fff;
}
.attribute-value-btn.out-of-stock { opacity: .55; cursor: not-allowed; }
.attribute-value-btn.out-of-stock::after {
    content:''; position:absolute; top:50%; left:0; right:0; height:2px;
    background: var(--danger-color); transform: translateY(-50%);
}

/* Reset Attributes */
#reset-attributes {
    background: var(--bg-color);
    border:1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--pd-transition);
}
#reset-attributes:hover { background: var(--danger-color); border-color: var(--danger-color); color:#fff; }

/* ==============================
   Quantity & Add to Cart
============================== */
.quantity-selector { margin-bottom: .75rem; }
.quantity-selector .input-group { max-width: 180px; }
.quantity-selector .btn,
.quantity-selector .form-control { border-radius: 10px; }

/* Main buttons */
.btn-accent {
    background: var(--accent);
    color: #fff !important;
    border: 1px solid var(--accent);
    border-radius: 10px;
    font-weight: 700;
    padding: 12px 20px;
    transition: all .2s ease;
}
.btn-accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(237, 25, 37, .25);
}
.btn-ghost-secondary {
    background: #fff;
    color: var(--secondary) !important;
    border: 1px solid var(--secondary);
    border-radius: 10px;
    font-weight: 700;
    padding: 12px 20px;
    transition: all .2s ease;
}
.btn-ghost-secondary:hover {
    background: var(--secondary); color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(45, 49, 148, .22);
}
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-row .btn { min-height: 44px; }
#add-to-cart-btn:disabled, #buy-now-btn:disabled {
    opacity: .6; cursor: not-allowed; box-shadow: none !important; transform: none !important;
}

/* ==============================
   Stock Status
============================== */
.stock-status { display:flex; align-items:center; gap:8px; }
.stock-status .badge {
    font-size: .85rem; padding:.45rem .75rem;
    border-radius: 999px; font-weight:600; display:flex; align-items:center; gap:6px;
}

/* ==============================
   Product Details, Tabs, Table
============================== */
.product-details {
    background: linear-gradient(135deg, var(--light-bg) 0%, #fff 100%);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.05);
    margin-top: 1.5rem;
    animation: fadeInUp .5s ease;
}

/* Breadcrumb */
.breadcrumb-compact {
    background: #fff; border: 1px solid var(--border-light);
    border-radius: 8px; padding: .5rem .9rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.breadcrumb-compact .breadcrumb-item a { color: var(--secondary); font-weight: 500; }
.breadcrumb-compact .breadcrumb-item.active { color: var(--text-primary); font-weight: 600; }

/* Tabs */
.tabs-slim {
    border: none; border-radius: 10px 10px 0 0;
    overflow: hidden; background: var(--secondary);
}
.tabs-slim .nav-link {
    color: rgba(255,255,255,.85); border: none;
    font-weight: 600; font-size: .9rem; padding: .7rem 1.1rem;
    transition: background .25s;
}
.tabs-slim .nav-link:hover { background: rgba(255,255,255,.12); }
.tabs-slim .nav-link.active { background: var(--accent); color: #fff; }

/* Content */
.content-compact { padding: 1rem 0; }
.section-title {
    font-size: 1.05rem; font-weight: 600;
    border-left: 3px solid var(--accent);
    padding-left: .5rem; margin-bottom: .75rem;
    color: var(--text-primary);
}
.content-text { line-height: 1.7; font-size: .95rem; color: var(--text-secondary); }

/* Table */
.table-compact td { padding: .75rem; font-size: .9rem; }
.table-compact td.bg-light { width: 35%; font-weight: 600; }
.table-compact tr:hover { background: rgba(45,49,148,.03); }

/* ==============================
   Certificate Viewer
============================== */
.viewer-compact .pdf-controls,
.viewer-compact .image-controls {
    padding: .5rem .75rem;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}
.frame-slim { min-height: 460px; border-radius: 8px; overflow: hidden; }
.pdf-frame { height: 460px; }

/* ==============================
   Animations
============================== */
@keyframes fadeInUp { from{ opacity:0; transform: translateY(18px);} to{ opacity:1; transform:none; } }
@keyframes slideInRight { from{ opacity:0; transform: translateX(18px);} to{ opacity:1; transform:none; } }

/* ==============================
   Responsive
============================== */
@media (max-width: 991.98px) {
    .product-info { position: static; margin-top: var(--pd-spacing-lg); padding: var(--pd-spacing-lg); }
    .product-title { font-size: clamp(1.2rem, 4vw, 1.6rem); }
    .current-price { font-size: 1.35rem; }
}
@media (max-width: 767.98px) {
    .product-details { padding: var(--pd-spacing-lg); }
    .product-info { padding: var(--pd-spacing-md); }
    .add-to-cart-section { padding: var(--pd-spacing-md); }
    .attribute-values { gap: 6px; }
    .attribute-value-btn { padding: 7px 10px; font-size: .9rem; }
    .product-actions { justify-content:center; }
}
@media (max-width: 575.98px) {
    .product-price { flex-direction: column; align-items:flex-start; gap:6px; }
    .current-price { font-size: 1.2rem; }
    .image-thumbnails { gap:6px; }
    .thumbnail { width:58px; height:58px; }
    .btn-row .btn { flex: 1 1 100%; }
    .add-to-cart-section .row { flex-direction: column; }
}

