#side-panel-wrapper { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 1050; 
    display: none; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
}

#side-panel-wrapper.open { 
    display: block; 
    opacity: 1; 
}

#side-panel-wrapper .side-panel-backdrop { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
}

#side-panel-wrapper .side-panel-content { 
    position: absolute; 
    top: 0; 
    right: -500px; 
    left: auto;
    width: 100%; 
    max-width: 480px; 
    height: 100%; 
    background: #fff; 
    transition: right 0.3s ease, left 0.3s ease; 
    box-shadow: -2px 0 10px rgba(0,0,0,0.1); 
    display: flex; 
    flex-direction: column; 
}

#side-panel-wrapper.open .side-panel-content { 
    right: 0; 
    left: auto;
}

[dir="rtl"] #side-panel-wrapper .side-panel-content {
    right: auto;
    left: -500px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

[dir="rtl"] #side-panel-wrapper.open .side-panel-content {
    right: auto;
    left: 0;
}

/* Panel Layout */
.size-guide-panel { display: flex; flex-direction: column; height: 100%; }
.panel-header { padding: 0; display: flex; flex-direction: column; border-bottom: 1px solid #f0f0f0; }
.panel-body { padding: 24px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.panel-footer { padding: 20px 24px; border-top: 1px solid #f0f0f0; background: #fff; }
.close-panel { background: none; border: none; cursor: pointer; padding: 5px; color: #333; transition: transform 0.2s; }
.close-panel:hover { transform: scale(1.1); }

/* Product Info */
.product-info-header { background: #fff; }
.prod-img { background: #fff; display: flex; align-items: center; justify-content: center; }

/* Table Styles */
.size-chart-table-clean { width: 100%; border-collapse: separate; border-spacing: 0; }
.size-chart-table-clean th { border: none; border-bottom: 1px solid #eee; padding: 12px 8px; font-weight: 600; font-size: 13px; text-transform: uppercase; color: #999; text-align: left; }

[dir="rtl"] .size-chart-table-clean th {
    text-align: right;
}
.size-chart-table-clean td { border-bottom: 1px solid #f9f9f9; padding: 16px 8px; font-size: 14px; color: #333; vertical-align: middle; }

/* Hover + Select */
.selectable-row { cursor: pointer; transition: background-color 0.2s; }
.selectable-row:hover { background-color: #f8f9fa; }
.selected-row-highlight { background-color: #f5f5f5 !important; }
.selected-row-highlight td { font-weight: 600; color: #000; }

/* Custom Radio Buttons */
.custom-control-input:checked ~ .custom-control-label::before { 
    color: #fff; 
    border-color: #000; 
    background-color: #000; 
}
.custom-radio .custom-control-input:checked ~ .custom-control-label::after { 
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); 
}
/* Header Layout */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.product-info-header {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.prod-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 20px;
    margin-left: 0;
}

[dir="rtl"] .prod-img {
    margin-right: 0;
    margin-left: 20px;
}

.prod-details {
    flex: 1;
    min-width: 0;
}

[dir="rtl"] .prod-details {
    text-align: right;
}

.prod-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-name {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 4px;
}

.product-title {
    font-size: 15px;
    line-height: 1.3;
    color: #333;
    margin-bottom: 4px;
}

.price {
    font-size: 16px;
    font-weight: bold;
    color: #000;
}

/* Unit Toggle */
.unit-toggle-custom {
    display: flex;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 2px;
}

.unit-option {
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

.unit-option.active {
    background: #000;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Size Chart */
.size-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-top: 12px;
}

.size-chart-title {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    padding-bottom: 5px;
    border-bottom: 2px solid #000;
}

/* Radio cell */
.radio-cell {
    width: 40px;
    text-align: center;
    vertical-align: middle;
}

.size-label-cell {
    font-weight: bold;
}

/* How to measure */
.how-to-measure-header {
    padding-top: 20px;
    margin-bottom: 10px;
    border-top: 1px solid #dedede;
}

.how-to-measure-section {
    text-align: center;
    background: #f8f8f8;
    padding: 20px;
    border-radius: 6px;
}

.how-to-measure-section img {
    max-height: 400px;
    width: auto;
}
.how-to-measure-header h6 {
    font-size: 16px;
    font-weight: 700 !important;
    color: #222;
    margin-bottom: 10px;
}
.product-measurement-scale {
    margin-top: 25px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e7e7e7;
}
.measure-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #222;
}
.measure-row {
    margin-bottom: 22px;
}

.measure-label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.measure-scale { position: relative; }
.scale-inner {
    position: relative;
    padding: 0 14px;
}

.scale-labels {
    position: relative;
    height: 20px;
}
.scale-labels .label-item {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 13px;
    color: #555;
    pointer-events: none;
    max-width: 34%;   
    overflow: hidden;
    text-overflow: ellipsis;
}

.scale-labels .label-item:first-child {
    left: 0 !important;
    transform: translateX(0);
    text-align: left;
}
.scale-labels .label-item:last-child {
    left: 100% !important;
    transform: translateX(-100%);
    text-align: right;
}

[dir="rtl"] .scale-labels .label-item:first-child {
    text-align: right;
}
[dir="rtl"] .scale-labels .label-item:last-child {
    text-align: left;
}

/* Grey line */
.scale-line {
    position: relative;
    height: 6px;
    background: #dedede;
    border-radius: 4px;
    margin-top: 10px;
}

.scale-indicator {
    position: absolute;
    top: -3px;
    width: 22px;
    height: 8px;
    background: #000;
    border-radius: 4px;
    transform: translateX(-50%);
    transition: left 0.25s ease;
}
.strong-title {
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .scale-inner { padding: 0 10px; }
    .scale-labels .label-item { font-size: 11px; max-width: 40%; }
    .measure-label { font-size: 14px; }
    .scale-indicator { width: 16px; height: 10px; }
}
