/* ==========================================================================
   GenericTablet — Medicine Directory Styles
   ========================================================================== */

.gt-directory-page-container {
    padding: 40px 20px 80px 20px;
    background-color: #f8fafc;
    min-height: 80vh;
}

.gt-page-inner {
    max-width: 1240px;
    margin: 0 auto;
}

.gt-page-header {
    text-align: center;
    margin-bottom: 30px;
}

.gt-main-heading {
    font-size: 32px;
    font-weight: 700;
    color: #0f1929;
    margin-bottom: 8px;
}

.gt-sub-heading {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Alphabet Bar */
.gt-alphabet-strip {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    /*margin-bottom: 32px;*/
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gt-alphabet-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.gt-alphabet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gt-alpha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #f1f5f9;
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gt-alpha-btn:hover {
    background-color: #00b4d8;
    color: #ffffff;
    transform: translateY(-2px);
}

.gt-alpha-btn.is-active {
    background-color: #24aeb1 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(36, 174, 177, 0.4);
}

/* Directory Header */
.gt-directory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.gt-directory-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #0f1929;
    margin: 0;
}

.gt-found-count {
    font-size: 14px;
    color: #64748b;
    background: #e2e8f0;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Product Grid */
.gt-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .gt-product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .gt-product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .gt-product-grid { grid-template-columns: 1fr; }
}

/* Medicine Card */
.gt-med-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s ease;
}

.gt-med-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.gt-med-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.gt-med-thumb img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.gt-med-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.gt-med-title a {
    color: #0f1929;
    text-decoration: none;
}

.gt-med-title a:hover {
    color: #24aeb1;
}

.gt-med-price {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

/* Action Rows & Quantity */
.gt-med-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gt-qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    width: 85px;
    height: 38px;
}

.gt-qty-btn {
    width: 25px;
    height: 100%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: #475569;
}

.gt-qty-input {
    width: 35px;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.gt-qty-input::-webkit-outer-spin-button,
.gt-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.gt-add-to-cart-btn {
    flex: 1;
    height: 38px;
    background-color: #24aeb1;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gt-add-to-cart-btn:hover {
    background-color: #1c8687;
}

/* Pagination */
.gt-directory-pagination {
    margin-top: 40px;
    text-align: center;
}

.gt-directory-pagination ul {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
}

.gt-directory-pagination li a,
.gt-directory-pagination li span.current {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.gt-directory-pagination li span.current {
    background: #24aeb1;
    color: #ffffff;
    border-color: #24aeb1;
}

/* Cart Button Dynamic States */
.gt-add-to-cart-btn {
    transition: background-color 0.25s ease, color 0.25s ease !important;
}

.gt-add-to-cart-btn.is-added {
    background-color: #dc2626 !important; /* Medical Red */
    color: #ffffff !important;
}

.gt-add-to-cart-btn.is-added:hover {
    background-color: #b91c1c !important;
}

.gt-add-to-cart-btn.is-update {
    background-color: #ea580c !important; /* Action Orange */
    color: #ffffff !important;
}

.gt-add-to-cart-btn.is-update:hover {
    background-color: #c2410c !important;
}